Sorting algorithms/Insertion sort: Difference between revisions

Improved D code
(Improved D code)
Line 313:
foreach (i; 1 .. data.length) {
auto value = data[i];
intptrdiff_t j = i - 1;
while (j >= 0 && data[j] > value) {
data[j + 1] = data[j];
Anonymous user