Sorting algorithms/Strand sort: Difference between revisions
m
→{{header|Sidef}}: modified the code to work with the latest version of Sidef
m (→{{header|Sidef}}: code fix) |
m (→{{header|Sidef}}: modified the code to work with the latest version of Sidef) |
||
Line 1,456:
var out = [];
while (x && y) {
given (x[-1] <=> y[-1]) {
}
}
x + y + out;
}
Line 1,473 ⟶ 1,474:
}
}
}
return out;
}
Line 1,481 ⟶ 1,482:
while (var strd = strand(x)) {
out = merge(out, strd);
}
return out;
}
var a = 10.of {100.rand.int};
say "Before: #{a}";
say "After: #{strand_sort(a
{{out}}
|