Sorting algorithms/Cocktail sort with shifting bounds: Difference between revisions

Content added Content deleted
(→‎{{header|Raku}}: Add a Raku example)
m (→‎{{header|REXX}}: elided part of a comment from the REXX section header.)
Line 310: Line 310:


=={{header|REXX}}==
=={{header|REXX}}==
This REXX version can handle array elements that may contain blanks or spaces,  
This REXX version can handle array elements that may contain blanks or spaces.
<br>and uses an improved algorithm that uses &nbsp; ''shifting bounds''.
<lang rexx>/*REXX program sorts an array using the cocktail─sort method with shifting bounds. */
<lang rexx>/*REXX program sorts an array using the cocktail─sort method with shifting bounds. */
call gen /*generate some array elements. */
call gen /*generate some array elements. */