Timeline, probe and tree search
Search cost, hits and tree height

Interval Tree: Timeline, Tree Nodes and Search Cost Against Brute Force (2D)

A wooden timeline board carries brass rails, one per stored interval, while the same intervals hang behind them as sapphire nodes of a binary search tree ordered by start, each node remembering the largest end below it. A probe sweeps along the board and the tree is searched at every position: nodes that contain the probe turn green, nodes visited in vain turn yellow, and whole subtrees whose largest end lies left of the probe, or whose starts lie right of it, are skipped. Choose stabbing or window queries, the number and length of intervals, and a balanced or insertion-order tree, and compare the visited nodes with the n checks of brute force. Seven independent numerical checks cover the search against brute force, the augmentation, the cost bound, the balanced height and an integral for the expected number of hits.

Made with 🟠 Blender