Multiple choice

How many distinct binary search trees can be created out of 4 distinct keys?

  1. 5

  2. 14

  3. 24

  4. 42

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The number of distinct binary search trees with n nodes is given by the nth Catalan number: C(n) = (1/(n+1)) * binom(2n, n). For n=4, C(4) = (1/5) * binom(8, 4) = (1/5) * 70 = 14.