How many distinct binary search trees can be created out of 4 distinct keys?
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.