Intermediate~6 min · +40 XP
Tree Traversal Order
Practices: Binary Trees & Traversals
Problem
Binary tree: root 1; 1's children 2 (left) and 3 (right); 2's children 4 (left) and 5 (right).
What is the IN-ORDER traversal (left → node → right)? (Format: comma-separated)
Examples
in: root 1 with single left child 2
out: 2,1
Left subtree (2) first, then the node (1).
Constraints & conventions
- In-order = fully process left subtree, visit node, fully process right subtree.
Your answer
Solve the challenge to unlock the full approach and complexity analysis.