Visualize recursive call stacks, queue progressions, and constant space threaded Morris algorithms.
Every node in the tree is visited exactly once.
H is the height of the tree. In the worst case (skewed tree), the call stack requires O(N) space, while in a balanced tree it takes O(log N).
preOrder(node) {if (node === null) return;
visit(node); // Process current node
preOrder(node.left); // Traverse left subtree
preOrder(node.right); // Traverse right subtree
}