all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
quicksort:{f:*x@1?#x;:[0=#x;x;,/(_f x@&x<f;x@&x=f;_f x@&x>f)]}
|
||||
|
|
@ -0,0 +1 @@
|
|||
quicksort 1 3 5 7 9 8 6 4 2
|
||||
|
|
@ -0,0 +1 @@
|
|||
1 2 3 4 5 6 7 8 9
|
||||
|
|
@ -0,0 +1 @@
|
|||
_f()
|
||||
|
|
@ -0,0 +1 @@
|
|||
:[....]
|
||||
|
|
@ -0,0 +1 @@
|
|||
f:*x@1?#x
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
:[
|
||||
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
|
||||
]
|
||||
|
|
@ -0,0 +1 @@
|
|||
t@<t:1 3 5 7 9 8 6 4 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue