GATE CS 2026 Set 2 | Question 12

Programming & Data Structures › Trees · MCQ · 1 mark · Answer: A

  1. Question 12Programming & Data Structuresmcq1 mark
    The set represents various traversals over a binary tree. The set represents the order of visiting nodes during a traversal.
    T                 S
    I:   Inorder      L: left subtree, node, right subtree
    II:  Preorder     M: node, left subtree, right subtree
    III: Postorder    N: left subtree, right subtree, node
    Which one of the following is the correct match from to ?
    • A.
      I – L, II – M, III – N
      ✓
    • B.
      I – M, II – L, III – N
    • C.
      I – N, II – M, III – L
    • D.
      I – L, II – N, III – M

    Answer: A

    Solution

    Answer: (A) Inorder visits left-node-right ; Preorder visits node-left-right ; Postorder visits left-right-node . Hence I–L, II–M, III–N.

More GATE PYQ on Trees

All GATE CS Programming & Data Structures PYQ →

Attempt GATE CS 2026 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →