all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1 @@
quicksort:{f:*x@1?#x;:[0=#x;x;,/(_f x@&x<f;x@&x=f;_f x@&x>f)]}

View file

@ -0,0 +1 @@
quicksort 1 3 5 7 9 8 6 4 2

View file

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

View file

@ -0,0 +1 @@
:[....]

View file

@ -0,0 +1 @@
f:*x@1?#x

View file

@ -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
]

View file

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