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 +1 @@
quicksort:{f:*x@1?#x;:[0=#x;x;,/(_f x@&x<f;x@&x=f;_f x@&x>f)]}
qsort:{$[2>#?x;x;,/o'x@&'~:\x<*1?x]}

View file

@ -1 +1 @@
quicksort 1 3 5 7 9 8 6 4 2
quicksort:{p:*x[1?#x];:[0=#x;x;,/(_f x[&x<p];x[&x=p];_f x[&x>p])]}

View file

@ -1 +1 @@
_f()
quicksort 1 3 5 7 9 8 6 4 2

View file

@ -1,9 +1 @@
:[
0=#x; / if length of x is zero
x; / then return x
/ else
,/( / join the results of:
_f x@&x<f / sort (recursively) elements less than f (pivot)
x@&x=f / element equal to f
_f x@&x>f) / sort (recursively) elements greater than f
]
p:*x[1?#x]

View file

@ -1 +1,9 @@
t@<t:1 3 5 7 9 8 6 4 2
:[
0=#x; / if length of x is zero
x; / then return x
/ else
,/( / join the results of:
_f x[&x<p] / sort (recursively) elements less than pivot p
x[&x=p] / elements equal to p
_f x[&x>p]) / sort (recursively) elements greater than p
]

View file

@ -0,0 +1 @@
t@<t:1 3 5 7 9 8 6 4 2