GATE IT 2005 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0220

The numbers \(1, 2, .\dots n\) are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains p nodes. The first number to be inserted in the tree must be
  1. A
    p
  2. B
    p + 1
  3. C
    n - p
  4. D
    n - p + 1

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

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/3757/gate2005-it-12

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