Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
Cleaned D code
(Undo revision 101335 by 208.80.119.67 (talk) — For this task, I think it is more to the point to have the algorithm) |
(Cleaned D code) |
||
Line 318:
=={{header|D}}==
<lang d>import std.stdio
void insertionSort(
int j = i - 1;
while (j >= 0 &&
j
}
}
}
void main() {
auto
insertionSort(
}</lang>
Output:
<pre>[2, 4, 11, 17, 19, 24, 25, 28, 44, 46]</pre>
=={{header|E}}==
{{Lines_too_long}}
|