DSA · Reimagined
Trees easy time O(h) space O(1)

BST — Search

Searching a BST is binary search on a tree: compare with the node, then go left or right. Each step discards an entire subtree, so a balanced tree finds any key in about log n steps.

50302045706085

Search for 45, starting at the root.

1 / 4

Practice

Machine twin: /dsa-viz-v2/bst-search.json — the full deterministic run as structured data.