Depth-First Search visits each subtree completely before backtracking. Inorder (L→Root→R) on a BST produces sorted output. Preorder is used for tree serialization.
time:O(n)
space:O(h) — tree height
⚡ +200_XP
step[1/18]
> Start
▸DFS Inorder traversal: Left → Root → Right. On a BST this gives sorted order.
// tap NEXT STEP to walk through one step at a time