Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,15 @@
combSort[list_] := Module[{ gap = 0, listSize = 0, swaps = True},
gap = listSize = Length[list];
While[ !((gap <= 1) && (swaps == False)),
gap = Floor@Divide[gap, 1.25];
If[ gap < 1, gap = 1]; i = 1; swaps = False;
While[ ! ((i + gap - 1) >= listSize),
If[ list[[i]] > list[[i + gap]], swaps = True;
list[[i ;; i + gap]] = list[[i + gap ;; i ;; -1]];
];
i++;
]
]
]