Algorithms and Data Structures · Senior · Question 33 of 75
Which structure lets you find all intervals overlapping a point in O(log n + k)?
- 1A trie of interval bounds
- ✓Correct answer: An interval tree
- 3A hash table keyed by start
Explanation
An interval tree is a balanced BST ordered by start, where each node also stores the maximum end in its subtree, so whole branches can be skipped. Calendars and genome tools use it.