How many distinct binary search trees can be created out of distinct keys?
View worked solution
Answer: B
The number of distinct binary search trees (BSTs) that can be constructed using distinct keys is given by the Catalan number, :
For distinct keys, we calculate as follows:
Thus, there are distinct binary search trees that can be created out of distinct keys.
Free practice · Your answers on this page are not saved.
