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,11 @@
radixSortR =: 3 : 0 NB. base radixSort data
16 radixSortR y
:
keys =. x #.^:_1 y NB. compute keys
length =. #{.keys
extra =. (-length) {."0 buckets =. i.x
for_pass. i.-length do.
keys =. ; (buckets,pass{"1 keys) <@:}./.extra,keys
end.
x#.keys NB. restore the data
)

View file

@ -0,0 +1 @@
radixsort=: (] #~ [: +/ =/) i.@(>./)

View file

@ -0,0 +1,2 @@
radixsort ?.@#~10
4 5 6 6 6 6 6 8 8

View file

@ -0,0 +1 @@
rsort=: (] + radixsort@:-) <./

View file

@ -0,0 +1,2 @@
rsort _6+?.@#~10
_2 _1 0 0 0 0 0 2 2