Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
Sorting algorithms/Insertion sort (view source)
Revision as of 15:36, 31 January 2012
, 12 years agoUpdated D code
(Updated D code) |
|||
Line 310:
<lang d>import std.stdio;
void insertionSort(T)(T[] data) pure nothrow {
foreach (i, value; data[1 .. $]) {
auto j = i + 1;
|