in Algorithms edited by
1,790 views
1 vote
1 vote

​​​​​​You are given a set $V$ of distinct integers. A binary search tree $T$ is created by inserting all elements of $V$ one by one, starting with an empty tree. The tree $T$ 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 $T$, and you do not have access to $T$.


Which one of the following statements is TRUE?

  1. Inorder traversal of $T$ can be determined from $V$
  2. Root node of $T$ can be determined from $V$
  3. Preorder traversal of $T$ can be determined from $V$
  4. Postorder traversal of $T$ can be determined from $V$
in Algorithms edited by
by
1.8k views

1 Answer

1 vote
1 vote
Answer is A.

Inorder traversal of a binary search tree gives the sorted tree as it will traverse left root right. Also as we have the set V so we can arrange this in increasing order and derive the inorder traversal of the BST.
Answer:

Related questions