To check the intersections between interval [a,b] and [c,d], there are four cases (equal not shown in the figures):
a____b
c____d
a____b
c____d
a_______b
c___d
a___b
c_______d
But we can simplify these into 2 cases when check the smaller (smaller start point) interval with the bigger interval.
No comments:
Post a Comment