Kd-Trees

Geometric application of BSTs

image image image

1d range count on BST can be achieved with recursive rank() calls.

image

Orthogonal line segment intersection - sweep line algorithm

image image image

2-d orthogonal range search - Kd-trees

Kd tree: Recursively partition k-dimensional space into 2 halfspaces