The inorder and preorder traversal of binary tree are d, b, e, a, f, c, g and…
2026
The inorder and preorder traversal of binary tree are d, b, e, a, f, c, g and a, b, d, e, c, f, g respectively. The postorder traversal of the binary tree is:
- A.
d, e, b, f, g, c, a
- B.
e, d, b, g, f, c, a
- C.
e, d, b, f, g, c, a
- D.
d, e, f, g, b, c, a
Attempted by 133 students.
Show answer & explanation
Correct answer: A
The preorder traversal starts with 'a', identifying it as the root. In the inorder sequence, elements left of 'a' form the left subtree (d, b, e) and right elements form the right subtree (f, c, g). Recursively determining subtrees yields left postorder d, e, b and right postorder f, g, c. Combining these with the root gives the final postorder traversal: d, e, b, f, g, c, a.