This simulator visualizes an interval tree built from a small set of intervals and shows how a query is answered by descending the tree and pruning subtrees whose max endpoint rules out any possible overlap.
Add or adjust intervals to build the tree, then enter a query interval or point to watch the search traverse the tree, highlighting visited nodes, pruned subtrees, and the final overlapping matches.
Use the interval editor to build the tree and the query field to run overlap searches and watch the pruning happen step by step.
A single max-endpoint comparison at the root of a large subtree can eliminate thousands of intervals from consideration in one step, which is why interval trees stay fast even as the stored collection grows very large.
This simulator visualizes an interval tree built from a small set of intervals and shows how a query is answered by descending the tree and pruning subtrees whose max endpoint rules out any possible overlap.
This simulator visualizes an interval tree built from a small set of intervals and shows how a query is answered by descending the tree and pruning subtrees whose max endpoint rules out any possible overlap.
Add or adjust intervals to build the tree, then enter a query interval or point to watch the search traverse the tree, highlighting visited nodes, pruned subtrees, and the final overlapping matches.
A single max-endpoint comparison at the root of a large subtree can eliminate thousands of intervals from consideration in one step, which is why interval trees stay fast even as the stored collection grows very large.