The postorder traversal of a binary tree is ACEDBHIGF. The preorder traversal…
2020
The postorder traversal of a binary tree is ACEDBHIGF. The preorder traversal is:
Answer: E. None of these — ConceptA traversal fixes only the order in which nodes are visited; it does not, by itself, describe every parent-child link. For a general binary tree,…
- A.
ABCDEFGHI
- B.
FBADCEGIH
- C.
FABCDEGHI
- D.
ABDCEFGIH
- E.
None of these
Attempted by 552 students.
Show answer & explanation
Correct answer: E
Concept
A traversal fixes only the order in which nodes are visited; it does not, by itself, describe every parent-child link.
For a general binary tree, preorder and postorder together can correspond to more than one structure, while postorder alone cannot determine a unique preorder. An inorder traversal or an additional structural rule is needed for unique reconstruction.
Application
In postorder, the last node is the root, so F must be the root.
The preceding nodes ACEDBHIG do not reveal where F's left subtree ends and its right subtree begins. Different valid partitions therefore produce different trees.
One valid tree has F with children B and G; B has children A and D; D has children C and E; G has child I; and I has child H. Its postorder is ACEDBHIGF and its preorder is FBADCEGIH.
Another valid tree is a single-child chain F → G → I → H → B → D → E → C → A. Its postorder is also ACEDBHIGF, but its preorder is FGIHBDECA.
Cross-check
Both constructions end their postorder traversal at F, as required for the same root.
The two constructions reproduce the full supplied postorder sequence but yield different preorder sequences, proving non-uniqueness.
Treating the letters as a sorted inorder sequence would add a binary-search-tree assumption that the stem does not state.
Therefore, no unique preorder traversal can be selected from the supplied information; among the offered choices, the defensible response is “None of these”.
A video solution is available for this question — log in and enroll to watch it.