Stack
94. Binary Tree Inorder Traversal
The iterative in-order traversal, worth knowing even though recursion is trivial here. Keep a pointer curr and an explicit stack. Push your way all the way down the left spine; then pop a node…
Loading…
The iterative in-order traversal, worth knowing even though recursion is trivial here. Keep a pointer curr and an explicit stack. Push your way all the way down the left spine; then pop a node…
Loading…