Loading tutorials
(low, high) with low <= high. All intervals here are closed, so both endpoints belong to the interval.2 min reada[0] <= b[1] and b[0] <= a[1].2 min reada and b overlap when a[0] <= b[1] and b[0] <= a[1].2 min readmax field holds the largest high endpoint in that node's subtree.2 min read(lo, hi). The tree is ordered by lo. Each node's max field holds the2 min readfind_overlap loop. Here we prove that the loop is correct.2 min readmax is the largest high endpoint in its subtree. You should also know the single-result search. Here you extend that search to return every overlapping inter2 min readmax field of every node whose subtree changed.2 min readmax field, and the tree is ordered by low endpoint. Here n is the number of stored intervals, h is the tree height, and k is the number of in2 min readinsert, and find_overlap. It shows where that structure pays off and how to recognize the problems it fits.2 min read