Kth Order Statistic

What is the most efficient algorithm to find the kth smallest/largest element in an array having n elements?


There is a good discussion on the available algorithms with pseudocode, complexity and possible implementations here:

https://www.quora.com/What-is-the-most-efficient-algorithm-to-find-the-kth-smallest-element-in-an-array-having-n-elements

Here's a sorting and then a quickselect plus a minheap implementation:

http://www.programcreek.com/2014/05/leetcode-kth-largest-element-in-an-array-java/


Comments