Anonymous user
Sorting algorithms/Cocktail sort: Difference between revisions
m
→{{header|REXX}}: changed wording in the section headers.
m (→{{header|REXX}}: elided the 3rd example.) |
m (→{{header|REXX}}: changed wording in the section headers.) |
||
Line 2,728:
=={{header|REXX}}==
===version handles blanks===
This REXX version can handle
<lang rexx>/*REXX program sorts an array using the cocktail─sort method, A.K.A.: happy hour sort,*/
/* bidirectional bubble sort, */
Line 2,832:
===version handles non-blanks===
This faster REXX version can handle
<lang rexx>/*──────────────────────────────────────────────────────────────────────────────────────*/
cocktailSort2: procedure expose @.; parse arg N; nn=n-1 /*N: the number of items in @.*/
|