BST Range Search
Report every value in a range, entering only the subtrees that could hold one.
BST Queries: Values between 35 and 65
50 is in range, so report it. Both sides could hold more, so look at both.
Cost
- Best
- O(log n)
- Average
- O(log n + k)
- Worst
- O(n)
- Space
- O(h)
Before this
Taught by the same lesson
BST Queries covers these too, in the same run.