A Binary Search Tree (BST) stores values in the range 37 to 573. Consider the…

GATE · 2008 · IT

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, 305

II. 52, 97, 121, 195, 242, 381, 472

III. 142, 248, 520, 386, 345, 270, 307

IV. 550, 149, 507, 395, 463, 402, 270

Which 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

Attempted by 312 students.

Show answer

Correct answer: C

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…