Sorting algorithms/Heapsort: Difference between revisions

m
m (→‎{{header|REXX}}: changed subroutine names (which signifies ownership).)
Line 3,207:
<pre>[0,0,2,3,3,8,17,36,40,72]</pre>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>siftDown[list_,root_,theEnd_]:=
While[(root*2) <= theEnd,
Line 3,217:
]
]
 
heapSort[list_] := Module[{ count, start},
count = Length[list]; start = Floor[count/2];
1,111

edits