GATE CS 2026, set 2 · Question 12 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

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 ?

TS
I: InorderL: left subtree, node, right subtree
II: PreorderM: node, left subtree, right subtree
III: PostorderN: left subtree, right subtree, node
  1. (A) I – L, II – M, III – N
  2. (B) I – M, II – L, III – N
  3. (C) I – N, II – M, III – L
  4. (D) I – L, II – N, III – M
Answer

Answer (A)

Answer from the official GATE CS 2026 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes