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,17 @@
function stoogesort!(a::Array, i::Int=1, j::Int=length(a))
if a[j] < a[i]
a[[i, j]] = a[[j, i]];
end
if (j - i) > 1
t = round(Int, (j - i + 1) / 3)
a = stoogesort!(a, i, j - t)
a = stoogesort!(a, i + t, j)
a = stoogesort!(a, i, j - t)
end
return a
end
x = randn(10)
@show x stoogesort!(x)