An interval tree data structure

SqueakSource3 project page

An immutable data structure that uses O(n) space to store n intervals, and takes O(log n) + k time to answer the queries "which intervals intersect with this interval?" and "which intervals contain this value?", k is the number of intervals in the query result.

IntervalTree-rvc.18.mcz