Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2011 | Question 11

Improve Article
Save Article
  • Last Updated : 10 Nov, 2022
Improve Article
Save Article

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

(A)

5

(B)

14

(C)

24

(D)

35


Answer: (B)

Explanation:

Distinct binary search trees that can be created out of 4 distinct keys can be found out using the Catalan number. 
Catalan number = (2n)!/(n! * (n+1)!) 
Here n = 4, 
Number of distinct BST\’s = (4 x 2)! / (4! x 5!) = 14 

So, correct option is (B)


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!