GATE IT 2008 · Arrays & Matrix Representation

MCQ · 2 marks · Problem PROG-DSTR-0186

A Binary Search Tree (BST) stores values in the range 37 to 573. Consider the following sequence of keys.I. 81,537,102,439,285,376,305II. 52,97,121,195,242,381,472III. 142,248,520,386,345,270,307IV. 550,149,507,395,463,402,270Which of the following statements is TRUE?
  1. A
    I, II and IV are inorder sequences of three different BSTs
  2. B
    I is a preorder sequence of some BST with 439 as the root
  3. C
    II is an inorder sequence of some BST where 121 is the root and 52 is a leaf
  4. D
    IV is a postorder sequence of some BST with 149 as the root

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/3386/gate2008-it-72

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