1.

What is the expected number of leaves in a randomized binary search tree?(a) n + 1(b) (n + 1)/3(c) (n + 1)/2(d) n + 3This question is from Binary Trees in portion Binary Trees of Data Structures & Algorithms IThis question was addressed to me by my college professor while I was bunking the class.

Answer»

The correct answer is (B) (n + 1)/3

To explain: In a RANDOM mathematical model, the expected value of NUMBER of leaves in a randomized binary search tree is found to be exactly (n + 1)/3 USING probability.



Discussion

No Comment Found

Related InterviewSolutions