Data Structures & AlgorithmsHardGATE CS · ICPC regional · Product Company SDE

Keys 87, 32, 67, 97, 11, 60, 23, 69, 21 are inserted in this order into an empty BST. How many nodes lie in the left subtree of the root 87?

  1. A. 8
  2. B. 11
  3. C. 6
  4. D. 7

Correct answer: D. 7

Exactly the keys smaller than 87 go left, so the left subtree has 7 nodes (the right has 1).

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic