Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,48 @@
|
|||
[ dup size 2 < iff
|
||||
[ drop true ] done
|
||||
true swap
|
||||
dup [] != if
|
||||
[ behead swap witheach
|
||||
[ tuck > if
|
||||
[ dip not
|
||||
conclude ] ] ]
|
||||
drop ] is sorted ( [ --> b )
|
||||
|
||||
[ behead swap witheach
|
||||
[ 2dup < iff
|
||||
nip else drop ] ] is largest ( [ --> n )
|
||||
|
||||
[ dup largest 1+
|
||||
over size
|
||||
dup 1
|
||||
[ 2dup > while
|
||||
1 << again ]
|
||||
nip swap -
|
||||
dup dip [ of join ]
|
||||
swap ] is pad ( [ --> n [ )
|
||||
|
||||
[ swap dup if
|
||||
[ negate split drop ] ] is unpad ( n [ --> [ )
|
||||
|
||||
[ dup size times
|
||||
[ i i^ > not iff
|
||||
conclude done
|
||||
dup i peek
|
||||
over i^ peek
|
||||
2dup < iff
|
||||
[ rot i poke
|
||||
i^ poke ]
|
||||
else 2drop ] ] is reorder ( [ --> [ )
|
||||
|
||||
[ pad
|
||||
[ [ dup sorted if done
|
||||
reorder
|
||||
dup size 2 / split
|
||||
recurse swap
|
||||
recurse swap join ]
|
||||
dup sorted until ]
|
||||
unpad ] is circlesort ( [ --> [ )
|
||||
|
||||
$ "bababadalgharaghtakamminarronnkonnbronntonnerronntuonnthunntrovarrhounawnskawntoohoohoordenenthurnuk"
|
||||
dup echo$ cr
|
||||
circlesort echo$ cr
|
||||
Loading…
Add table
Add a link
Reference in a new issue