Best Performance on Min heap for Kth element?

Viewed 399

Min heap with P distinct element is given. We want to find Kth (k <= Sqrt (P)) smallest element in this heap using the best algorithm in O(K log K). (There are k-1 numbers smaller than it exactly).

What is the algorithm in this time complexity? It means, how does it work?

0 Answers
Related