In this video, we consider windowing queries, where the input is a set of horizonal or vertical line segments and we query with an axis-aligned rectangle. For a windowing query, we want to report all line segments and intersect (or lie in) the query rectangle.
The solution presented in this video uses interval trees as main data structure with 2d range trees as associated data structures.
This is a follow-up video to our "Range Searching" video, so make sure to watch that first, in case you haven't yet heard of range trees. There will be 2 more videos on windowing queries, more specifically one about priority search trees (which can be uses as associated data structures instead of the 2d range trees) and one about segment trees to handle arbitrary non-intersecting input line segments.
0:00 Introduction
1:37 Decomposing the problem
5:08 Interval trees
9:15 Example + storage
10:36 Interval trees: queries
16:56 back to windowing queries
18:18 Associated data structure: 2d range trees
21:43 Analysis
25:15 Wrap-Up