Content deleted Content added
→Specialised sorting algorithms: correct pseudocode, name |
→Specialised sorting algorithms: remove the second algorithm, which is actually quickselect |
||
Line 25:
The resulting algorithm is called partial quicksort and requires an ''expected'' time of only {{math|''O''(''n'' + ''k'' log ''k'')}}, and is quite efficient in practice, especially if we substitute selection sort when {{mvar|k}} becomes small relative to {{mvar|n}}. However, the worst-case time complexity is still very bad, in the case of a bad pivot selection. Pivot selection along the lines of the worst-case linear time selection algorithm could be used to get better worst-case performance.
==Tournament Algorithm==
|