How many distinct binary search trees can be created out of 4 distinct keys?
Explanation: See question 2 of https://www.geeksforgeeks.org/data-structures-and-algorithms-set-23/ for explanation. The link also has a generalized solution.
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.