Selection algorithm: Difference between revisions

Content deleted Content added
Dcoetzee (talk | contribs)
Noted advantages of minimum-based method and added section Selection as incremental sorting
Fredrik (talk | contribs)
m link in-place
Line 82:
</pre>
 
Note the resemblence to quicksort; indeed, just as the minimum-based selection algorithm is a partial selection sort, this is a partial quicksort, generating and partitioning only O(log ''n'') of its O(''n'') partitions. This simple procedure has expected linear performance, and, like quicksort, has quite good performance in practice. It is also an [[work-in-place|in-place]] algorithm, requiring only constant memory, since the tail recursion can be eliminated with a loop like this:
 
<pre>