GateAI
Trees

GATE CSE 2026 Set 2 · Q12

MCQ1 markEasy

Time

The set T\mathbf{T} represents various traversals over binary tree. The set S\mathbf{S} represents the order of visiting nodes during a traversal. Which one of the following is the correct match from T\mathbf{T} to S\mathbf{S} ?

GATE CSE 2026 Set 2 Q12 diagram

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) I – L, II – M, III – N

Trees

The standard binary tree traversal definitions are:

  1. Inorder Traversal (I): Visit the left subtree, then the root node, and then the right subtree (L→Node→RL \to \text{Node} \to R). Hence, I matches with L.

  2. Preorder Traversal (II): Visit the root node, then the left subtree, and then the right subtree (Node→L→R\text{Node} \to L \to R). Hence, II matches with M.

  3. Postorder Traversal (III): Visit the left subtree, then the right subtree, and finally the root node (L→R→NodeL \to R \to \text{Node}). Hence, III matches with N.

Therefore, the correct mapping is I – L, II – M, III – N, which corresponds to option (A).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Trees previous year question is Q12 of the GATE CSE 2026 Set 2 paper. Find more GATE CSE PYQs on Trees in Programming and Data Structures, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Trees PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Trees in GATE CSE

Trees has 13 GATE CSE PYQs across 11 papers from 2012 to 2026. 4 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2026 Set 2.

How GATE tests Trees

More from GATE CSE 2026 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2026 Set 2 · Q12 · MCQ

The set T represents various traversals over binary tree. The set S represents the order of visiting nodes during a traversal. Which one of the following is the correct match from T to S ?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.