aboutsummaryrefslogtreecommitdiff
path: root/src/shellsort.c
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2024-09-06 21:10:21 +0200
committerThomas Schmucker <ts@its1.de>2024-09-06 21:10:21 +0200
commit9e8caf1e06ba7510160305da11a30d91dcfc23e5 (patch)
tree30da0c941191d0907abe829feb1bf75f0fca4b3a /src/shellsort.c
parent4ecdad9462c4447c1370cf1dd1341b2289c28566 (diff)
downloaddata-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.tar.gz
data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.tar.bz2
data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.zip
reformat source code
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 };