Binary Tree Inorder Traversal (Iterative)

Easy · Trees · about 15 minutes

Asked at Microsoft, Amazon, Apple.

Produce the values of a binary tree in in-order (left subtree, then the node, then the right subtree). Recursion makes this easy, so do it without recursion, managing your own stack.

Related guides