Content deleted Content added
→Tournament Algorithm: {{unreferenced section}} |
→Heap-based solutions: remove unreferenced, hard to understand and possibly incorrect algorithm |
||
Line 11:
A [[streaming algorithm|streaming]], single-pass partial sort is also possible using heaps or other [[priority queue]] data structures. First, insert the first {{mvar|k}} elements of the input into the structure. Then make one pass over the remaining elements, add each to the structure in turn, and remove the largest element. Each insertion operation also takes {{math|''O''(log ''k'')}} time, resulting in {{math|''O''(''n'' log ''k'')}} time overall; this algorithm is practical for small values of {{mvar|k}} and in [[online algorithm|online]] settings.<ref name="aofa04slides"/>
== Specialised sorting algorithms ==
|