Sorting algorithms/Strand sort: Difference between revisions
m
→{{header|Sidef}}: minor code simplifications
m (→{{header|REXX}}: added/changed comments and whitespace, changed indentations, simplified a subroutine.) |
m (→{{header|Sidef}}: minor code simplifications) |
||
Line 1,535:
var out = [x.shift];
if (x.len) {
if (x[i] >= out[-1]) {
out.append(x.pop_at(i));
Line 1,552:
}
var a = 10.of { 100.
say "Before: #{a}";
say "After: #{strand_sort(a)}";</lang>
|