Anonymous user
Sorting algorithms/Heapsort: Difference between revisions
m
Another sync with the WP pseudocode
(end = end-1 must go before sift down, or else the algo doesn't work. See Wikipedia for the correct Psuedocode) |
m (Another sync with the WP pseudocode) |
||
Line 17:
end := end - 1
<span style="color: grey">''(put the heap back in max-heap order)''</span>
siftDown(a, 0, end
|