Help for this page

Select Code to Download


  1. or download this
    interval (1,20]
    subintervals (1,3],(5,10],(11,12],(15,17]
    A (sort of) balanced tree would look like:
    ...
      (1,3]  (15,17]
           (11,12]
     
    
  2. or download this
    If you consider the number 4 with the above tree
    4<=5 so you traverse down the left side.
    4>1 && 4>3 so you take the right child
    ...
    12>10 so go down right branch
    12<=15 so go down left branch
    12>11 and 12<=12 so 12 is covered.<