GATE DA 2026 Q25: Binary tree from preorder and inorder traversals
- Programming, Data Structures and Algorithms
- 1 mark
- MSQ
- No negative marking
Question
You are given the following Pre-order and In-order traversals of a Binary Tree T with nodes E, F, G, P, Q, R, S.
Pre-order: P Q S E R F G
In-order: S Q E P F R G
Which of the following statements is/are true about the Binary Tree T?
Try it: multiple select: one or more correct options
Show answer and explanation
Answer: A, B (official GATE 2026 final answer key)
Concept used: Preorder gives the root first; its position in inorder splits the left and right subtrees.
First step: Root P; inorder gives left {S, Q, E} with root Q (children S, E) and right {F, R, G} with root R (children F, G).
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 2026 DA question paper and final answer key, organised by IIT Guwahati. 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 · 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
- 2026 · Q49Comparisons by bubble sort and insertion sort on a nearly sorted array