You are given a set 𝑉 of distinct integers. A binary search tree 𝑇 is…

GATE Β· 2024 Β· CS Β· Set 2 Β· Computer Science & IT

You are given a set 𝑉 of distinct integers. A binary search tree 𝑇 is created by inserting all elements of 𝑉 one by one, starting with an empty tree. The tree 𝑇 follows the convention that, at each node, all values stored in the left subtree of the node are smaller than the value stored at the node. You are not aware of the sequence in which these values were inserted into 𝑇, and you do not have access to 𝑇.

Which one of the following statements is TRUE?

  1. A.

    Inorder traversal of 𝑇 can be determined from 𝑉

  2. B.

    Root node of 𝑇 can be determined from 𝑉

  3. C.

    Preorder traversal of 𝑇 can be determined from 𝑉

  4. D.

    Postorder traversal of 𝑇 can be determined from 𝑉

Attempted by 519 students.

Show answer

Correct answer: A

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…