Anonymous user
Sorting algorithms/Strand sort: Difference between revisions
m
→{{header|Perl 6}}: minor simplfications
m (→{{header|REXX}}: corrected a stray question mark. -- ~~~~) |
m (→{{header|Perl 6}}: minor simplfications) |
||
Line 790:
my $i = 0;
gather while $i < @x {
if @x[$i]
take $prev = splice(@x, $i, 1)[0];▼
else {▼
$i++;
}
}
}
Line 810:
say "After @a[]";
@a = <The quick brown fox jumps over the lazy dog
say "Before @a[]";
@a = strand_sort(@a);
Line 817:
<pre>Before 1 20 64 72 48 75 96 55 42 74
After 1 20 42 48 55 64 72 74 75 96
Before The quick brown fox jumps over the lazy dog
After The
=={{header|PicoLisp}}==
|