Anonymous user
Sorting algorithms/Strand sort: Difference between revisions
m
Small improvements in the D entry
(→{{header|C}}: modularize, sort of) |
m (Small improvements in the D entry) |
||
Line 231:
=={{header|D}}==
▲<lang d>import std.stdio, std.range, std.container, std.algorithm;
DList!T strandSort(T)(DList!T list) {
Line 273 ⟶ 272:
void main() {
auto lst = DList!int([-2,0,-2,5,5,3,-1,-3,5,5,0,2,-4,4,2]);
foreach (e; strandSort(lst))
}</lang>
{{out}}
|