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,18 @@
func stooge(x, i, j) {
if (x[j] < x[i]) {
x.swap(i, j)
}
if (j-i > 1) {
var t = ((j - i + 1) / 3)
stooge(x, i, j - t)
stooge(x, i + t, j )
stooge(x, i, j - t)
}
}
var a = 10.of { 100.irand }
say "Before #{a}"
stooge(a, 0, a.end)
say "After #{a}"