There is another algorithm for calculating kth order statistics, based on the soft heap data structure , which is an option in the standard priority queue that allows you to "spoil" a certain number of priorities that it stores. The algorithm is described in more detail in a Wikipedia article, but the main idea is to use the soft heap efficiently (O (n) time), select a reference point for the separation function, which has a guarantee of good separation. In a sense, this is simply a modified version of the median median algorithm, which uses a (possibly) simpler approach to selecting a collapse element.
, , ( " Chazelle" ), , .
, , O (n), introselect. . quickselect, . , . Introselect , , . - O (n 2) , - . , , , - , , , , , quickselect. O (n).
, ( quickselect ), . ( "Introspective " ).
, !