aboutsummaryrefslogtreecommitdiff
path: root/src/shellsort.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shellsort.c')
-rw-r--r--src/shellsort.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shellsort.c b/src/shellsort.c
index 29e6bf8..d35e5b0 100644
--- a/src/shellsort.c
+++ b/src/shellsort.c
@@ -9,10 +9,10 @@ typedef int T;
9void 9void
10shellsort(T a[], size_t n) 10shellsort(T a[], size_t n)
11{ 11{
12 //static const size_t gaps[] = { 701, 301, 132, 57, 23, 10, 4, 1 }; 12 // static const size_t gaps[] = { 701, 301, 132, 57, 23, 10, 4, 1 };
13 13
14 // Wikipedia: 14 // Wikipedia:
15 //static const size_t gaps[] = { 2147483647, 1131376761, 410151271, 157840433, 58548857, 21521774, 8810089, 3501671, 1355339, 543749, 213331, 84801, 27901, 11969, 4711, 1968, 815, 271, 111, 41, 13, 4, 1 }; 15 // static const size_t gaps[] = { 2147483647, 1131376761, 410151271, 157840433, 58548857, 21521774, 8810089, 3501671, 1355339, 543749, 213331, 84801, 27901, 11969, 4711, 1968, 815, 271, 111, 41, 13, 4, 1 };
16 16
17 // https://www.cs.princeton.edu/~rs/shell/paperF.pdf 17 // https://www.cs.princeton.edu/~rs/shell/paperF.pdf
18 static const size_t gaps[] = { 1391376, 463792, 198768, 86961, 33936, 13776, 4592, 1968, 861, 336, 112, 48, 21, 7, 3, 1 }; 18 static const size_t gaps[] = { 1391376, 463792, 198768, 86961, 33936, 13776, 4592, 1968, 861, 336, 112, 48, 21, 7, 3, 1 };