Exam-style question
Try this first
A tree has root P, with left child Q and right child R. Q has left child S, and R has right child T. What is the post-order traversal?.
- A.P, Q, S, R, T
- B.S, Q, T, R, P
- C.S, T, Q, R, P
- D.P, S, Q, T, R
Model answer
What a good answer should say
- S, Q, T, R, P
Explanation
Why this works
Post-order visits the left subtree first, then the right subtree, and finally the current node. The left subtree gives S, Q; the right subtree gives T, R; the root P is last.
Common mistake
No common mistake is linked to this question yet.
