Data Structures & AlgorithmsHardGATE CS · TCS NQT · Product Company SDE

Keys 82, 68, 95, 70, 94, 13, 69, 23, 56 are inserted in this order into an empty BST. How many leaf nodes does the resulting tree have?

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

Correct answer: B. 3

Insert in order (root 82) and count nodes with no children: 3 leaves.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic