joshuak94 / BAMIntervalTree

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Look into alternative "FastStabbing" implementation. #17

Open joshuak94 opened 3 years ago

joshuak94 commented 3 years ago

FastStabbing is an implementation for interval range queries which assumes n intervals with left and right endpoints in the range [1,...,O(n)]. Then it can index this list in Ω(n) space and time, with queries solved in Ω(1 + k) time, where k = # of results produced by the query.

This is better than Interval Trees, which require Ω(n log n) time to build and Ω(log n + k) time to query.