Anonymous user
Sorting algorithms/Heapsort: Difference between revisions
→{{header|Fortran}}: (fix overflow) Fortran allows for, but does not guarantee, short-circuit evaluation of logical operators.
m (→{{header|REXX}}: changed indentation, changed some comments. -- ~~~~) |
(→{{header|Fortran}}: (fix overflow) Fortran allows for, but does not guarantee, short-circuit evaluation of logical operators.) |
||
Line 897:
child = root * 2 + 1
if
if (a(child) < a(child+1)) child = child + 1
end if
|