1.

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

Answer»

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.



Discussion

No Comment Found

Related InterviewSolutions