Sorting algorithms/Heapsort: Difference between revisions
Content added Content deleted
m (→version 2: added a 2nd output to show the sorting of numbers.) |
m (→version 1: changed the wording in the REXX (version1) section header.) |
||
Line 2,836:
=={{header|REXX}}==
===version 1===
This REXX version uses a heapsort to sort elements of an array, the elements can be numbers or character strings.
<lang rexx>/*REXX program sorts an array (names of modern Greek letters) using a heapsort algorithm*/
@.=; @.1='alpha' ; @.6 ="zeta" ; @.11='lambda' ; @.16="pi" ; @.21='phi'
|