GATE CS 2026 · Set-2 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0079

The set \(\mathbf{T}\) represents various traversals over binary tree. The set \(\mathbf{S}\) represents the order of visiting nodes during a traversal.\[\begin{array}{|l|l|} \hline \quad\quad\textbf{T} & \quad\quad\quad\textbf{S} \\ \hline \text{I: Inorder} & \text{L: left subtree, node, right subtree} \\ \text{II: Preorder} & \text{M: node, left subtree, right subtree} \\ \text{III: Postorder} & \text{N: left subtree, right subtree, node} \\ \hline \end{array}\]Which one of the following is the correct match from \(\mathbf{T}\) to \(\mathbf{S}\) ?
  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}\)

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/523145/gate-cse-2026-set-2-question-2

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com