Data update

This commit is contained in:
Ingy döt Net 2024-10-16 18:07:41 -07:00
parent 81fd053722
commit 52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions

View file

@ -1,5 +1,5 @@
type BogoSorter
fun inOrder ← logic by List list
fun isOrdered ← logic by List list
if list.length ≤ 1 do return true end
for int i ← 1; i < list.length; ++i
if list[i] < list[i - 1] do return false end
@ -8,7 +8,7 @@ fun inOrder ← logic by List list
end
fun shuffle ← <List list|list.shuffle()
fun sort ← void by List list
while not inOrder(list)
while not isOrdered(list)
shuffle(list)
end
end

View file

@ -1,6 +1,6 @@
proc shuffle . l[] .
for i = len l[] downto 2
r = randint i
r = random i
swap l[i] l[r]
.
.