Fast way to check if a region overlaps another (1-d) region
<p>I have a huge set of regionssically thousands of points with a start and an end. I.e.:</p>

<p>[(3015, 3701), (4011, 5890), ....]</p>

<p>I also have another set of points (both start and end) where I want a quick way to test whether or not a region in this set overlaps a region in the other set. Is there a fast way to do this? </p>

<p>Thanks!</p>

<p>--EDIT--</p>

<p>@Spike Gronim answered my question with an Interval Tree.</p>

<p>Thanks, Spike!</p>

<p><a href="http://en.wikipedia.org/wiki/Interval_tree" rel="nofollow">http://en.wikipedia.org/wiki/Interval_tree</a></p>
