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)
Line 137: Line 137:


void main() {
void main() {
auto arr = DList!int([-2,0,-2,5,5,3,-1,-3,5,5,0,2,-4,4,2]);
auto lst = DList!int([-2,0,-2,5,5,3,-1,-3,5,5,0,2,-4,4,2]);
foreach(e; strandSort(arr))
foreach(e; strandSort(lst))
writef("%d ", e);
writef("%d ", e);
}</lang>
}</lang>