Sorting algorithms/Strand sort: Difference between revisions
Content added Content deleted
(→{{header|D}}: This algorithm really needs a doubly-linked list, but I didn't have one before) |
m (→{{header|D}}) |
||
Line 137: | Line 137: | ||
void main() { |
void main() { |
||
auto |
auto lst = DList!int([-2,0,-2,5,5,3,-1,-3,5,5,0,2,-4,4,2]); |
||
foreach(e; strandSort( |
foreach(e; strandSort(lst)) |
||
writef("%d ", e); |
writef("%d ", e); |
||
}</lang> |
}</lang> |