+1 vote
in Data Structures & Algorithms I by (110k points)
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 + 3

This question is from Binary Trees in portion Binary Trees of Data Structures & Algorithms I

This question was addressed to me by my college professor while I was bunking the class.

1 Answer

+1 vote
by (672k points)
selected by
Best 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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.