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,16 @@
(defparameter *shrink* 1.3)
(defun comb-sort (input)
(loop with input-size = (length input)
with gap = input-size
with swapped
do (when (> gap 1)
(setf gap (floor gap *shrink*)))
(setf swapped nil)
(loop for lo from 0
for hi from gap below input-size
when (> (aref input lo) (aref input hi))
do (rotatef (aref input lo) (aref input hi))
(setf swapped t))
while (or (> gap 1) swapped)
finally (return input)))