public static void main(String args[]) {
        IntervalTree it = new IntervalTree();
        InternalNode root = null;
        root = it.insert(root, 10, 15);
        root = it.insert(root, 11, 13);
        root = it.insert(root, 18, 21);
        root = it.insert(root, 20, 25);
        root = it.insert(root, 0, 7);

        System.out.println(it.isOverlap(root, 8, 9));
        System.out.println(it.isOverlap(root, 17, 17));
        System.out.println(it.isOverlap(root, 21, 22));
        System.out.println(it.isOverlap(root, 21, 22));
        System.out.println(it.isOverlap(root, 12, 18));
        System.out.println(it.isOverlap(root, 24, 26));
    }
Date 11/07/2015
@author Tushar Roy

Write class for interval tree
Keep a max at every node which is max of that subtree.
This max is used to decide which direction to move when checking
for overlap. When an interval's high is less than max of left side go
in that direciton otherwise go in other direction.
src/com/interview/tree/IntervalTree.java