Sorting algorithms/Heapsort: Difference between revisions

m (correct link into wikipedia)
Line 250:
{
int start, end;
/* heapify */
 
/* heapify */
for (start = (count-2)/2; start >=0; start--) {
siftDown( a, start, count);
}
 
for (end=count-1; end > 0; end--) {
SWAP(a[end],a[0]);
Anonymous user