1.

What is the expected depth of a node in a randomized binary search tree?(a) log n(b) n!(c) n^2(d) 2 log n + O(1)Asked question is from Binary Trees topic in section Binary Trees of Data Structures & Algorithms IThis question was posed to me in quiz.

Answer»

The correct CHOICE is (d) 2 log n + O(1)

For explanation: The expected value of depth of a node that is for a node a, the expected value of length of path from ROOT to node a is FOUND to be at most 2 log n + O(1).



Discussion

No Comment Found

Related InterviewSolutions