Tree Properties & Traversals


Answer & solution
Answer: 4, 1, 6, 7, 3, 2, 5, 8 (no official key was published)
Inorder recursively visits left subtree, node, then right subtree. The subtree rooted at 1 therefore gives 4, 1, 6. Next visit root 7. Node 3 has no left child, so visit 3 immediately, then traverse its right child 5 as 2, 5, 8. Concatenating gives 4, 1, 6, 7, 3, 2, 5, 8. The numeric labels are merely node names; this is not a binary search tree, and sorting the labels would not be a traversal. Every node appears exactly once.