How many randomized binary search trees can be formed by the numbers (1, 3, 2)?

Category: QuestionsHow many randomized binary search trees can be formed by the numbers (1, 3, 2)?
Editor">Editor Staff asked 1 month ago

How many randomized binary search trees can be formed by the numbers (1, 3, 2)?
 
(a) 2
 
(b) 3
 
(c) 6
 
(d) 5
 
The above asked question is from Binary Trees topic in section Binary Trees of Data Structures & Algorithms I
 
I have been asked this question in an interview for internship.

1 Answers
Editor">Editor Staff answered 1 month ago

The correct answer is (d) 5
 
Easy explanation – As there are 3 numbers (1, 3, 2) so total of 6 combinations can be formed using three numbers but Since (2, 1, 3) and (2, 3, 1) are same so in total there are 5 randomized binary search tree that can be formed.