GATE DA 2024 Q28: Traversal pairs that rebuild a full binary tree
- Programming, Data Structures and Algorithms
- 1 mark
- MSQ
- No negative marking
Question
Consider the following tree traversals on a full binary tree:
(i) Preorder
(ii) Inorder
(iii) Postorder
Which of the following traversal options is/are sufficient to uniquely reconstruct the full binary tree?
Try it: multiple select: one or more correct options
Show answer and explanation
Answer: A, B, C (official GATE 2024 final answer key)
Concept used: Tree reconstruction: inorder plus preorder or postorder always works; preorder plus postorder works when every node has 0 or 2 children.
First step: In a full binary tree the node after the root in preorder must be the left child, which splits the postorder sequence; inorder alone has many trees.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2024 DA question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key
More Programming, Data Structures and Algorithms PYQs
- 2026 · Q15Expected-time recurrence for randomised-input quicksort
- 2026 · Q16Python mutable default argument output
- 2026 · Q25Binary tree from preorder and inorder traversals
- 2026 · Q31Worst-case comparisons in binary search of 1000 elements
- 2026 · Q39Number of calls made by a Fibonacci-like recursion
- 2026 · Q40Reachability in a graph and its reverse