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

Keys 43, 47, 54, 30, 28, 26, 20, 64, 45 are inserted in this order into an empty BST. How many nodes lie in the left subtree of the root 43?

  1. A. 5
  2. B. 2
  3. C. 3
  4. D. 4

Correct answer: D. 4

Exactly the keys smaller than 43 go left, so the left subtree has 4 nodes (the right has 4).

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic