Answers

Question and Answer:

  Home  Programming Algorithms

⟩ How to find median of a BST?

Find the no. of elements on the left side.

If it is n-1 the root is the median.

If it is more than n-1, then it has already been found in the left subtree.

Else it should be in the right subtree.

 129 views

More Questions for you: