Wednesday, September 27, 2006

A quick quicksort

quicksort =: ($:@(}.#~{.>:}.),{.,[:$:}.#~{.<}.)`]@.(2:>#)

Apparently this is the quicksort implemented in J :D
It would look terrific on a t-shirt...


By the way, here is a nice site with explanations about the basic commands (and weird) syntax of J:
http://www.jsoftware.com/jwiki/Studio

No comments:

Post a Comment