Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2011 | Question 11
  • Last Updated : 10 May, 2018
GeeksforGeeks - Summer Carnival Banner

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 Catalon number.
Catalon 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

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :