Sorting algorithms/Heapsort: Difference between revisions

m
→‎version 1: added some verbage in the REXX section header (version 1). -- ~~~~
m (→‎version 1: added short-circuit IF (for optimization). -- ~~~~)
m (→‎version 1: added some verbage in the REXX section header (version 1). -- ~~~~)
Line 2,144:
=={{header|REXX}}==
===version 1===
This REXX version uses a heapsort to sort elements of an array, the elements can be numbers or strings.
<br>Indexing of the array (for this version) starts with &nbsp; '''1''' &nbsp; (one).
<lang rexx>/*REXX program sorts an array using the heapsort method. */
call gen@ /*generate the array elements. */