Sorting algorithms/Shell sort: Difference between revisions
Content added Content deleted
(→{{header|C}}: array is constant: initialize only once) |
|||
Line 66: | Line 66: | ||
{ |
{ |
||
int i, j, k, temp, increment; |
int i, j, k, temp, increment; |
||
int incSequence[] = {412771, 165103, 66041, 26417, 10567, 4231, 1693, 673, 269, 107, 43, 17, 7, 3, 1}; |
static int incSequence[] = {412771, 165103, 66041, 26417, 10567, 4231, 1693, 673, 269, 107, 43, 17, 7, 3, 1}; |
||
for (k = 0; k <= 14; k++) |
for (k = 0; k <= 14; k++) |
||
Line 84: | Line 84: | ||
} |
} |
||
}</c> |
}</c> |
||
=={{header|D}}== |
=={{header|D}}== |