I have a list of intervals that may overlap. And then I have a value, and the problem is to find all the intervals that contain this value, and the value itself is inclusive. I have seen several approaches, including range trees, KD trees, etc. But I am wondering if there is a specific optimized solution for this problem, given:
- The list of intervals is long. (Maybe 50K or more).
- Intervals may overlap.
- The list of intervals does not change after the start of the request.
- The list that was generated is queried for a large number of times with different values.
Can someone suggest some approaches to solve this. Thanks in advance.
source share