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,13 @@
def countingSort(array, min, max) {
def counts := ([0] * (max - min + 1)).diverge()
for elem in array {
counts[elem - min] += 1
}
var i := -1
for offset => count in counts {
def elem := min + offset
for _ in 1..count {
array[i += 1] := elem
}
}
}