Skip to content
BytePatterns

Trees & BST

Hierarchies, ordered searches, and the paths between nodes.

Trees & BST progress0 / 8
  1. Tree BasicsOne root, many branches, and no way back up.4m
  2. Binary TreesAt most two children: one left, one right, never swapped.4m
  3. Tree TraversalsSame nodes, same recursion, three different reading orders.5m
  4. BST BasicsSmaller values left, larger values right, all the way down.5m
  5. BST Insert and SearchOne comparison per level throws away half the tree.5m
  6. Validate a BSTChecking the parent is not enough; carry a range down.6m
  7. Tree Depth and BalanceHeight decides speed, and balance decides height.5m
  8. Lowest Common AncestorWalk down from the root until the two targets part ways.6m