Skip to content
GATEiit

GATE DA 2026 Q25: Binary tree from preorder and inorder traversals

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

Select one or more options
Select all correct options. No negative marking, no partial marks.
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

WhatsAppDownload image

Source: official GATE 2026 DA question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key