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) {
rangefor i in (-x.len, .. -1).each { |i|
if (x[i] >= out[-1]) {
out.append(x.pop_at(i));
Line 1,552:
}
 
var a = 10.of { 100.rand.intirand };
say "Before: #{a}";
say "After: #{strand_sort(a)}";</lang>
2,747

edits