Used for scheduling and planning.
Problem: Need data structure that determines if any of a
stored set of intervals overlaps a given interval. We want to perform all
associated operations in O(lg n) time.
Define a closed interval object i as [t1, t2] such that
, low(i) =t1, and high(i) = t2.
if low(i1) high(i2) and low(i2) high(i1)
then return True
else return False
Does [2, 7] overlap [5, 8]?
Yes. 2 is less than 8, and 5 is less than 7, points 6, 7 common to both.