2D segment tree querying - Henrik-Peters/Multi-Level-Segment-Tree GitHub Wiki

The first step of the query is to return the one-dimensional segment tree for the remaining x-dimension. The second step is to do a normal query on the tree. For example: