Created
July 17, 2013 01:51
-
-
Save christian-marie/6017045 to your computer and use it in GitHub Desktop.
The most best ever quicksort, obviously Ruby. Super fast.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s=->l{(p=l.pop)?s[l.select{|i|i<=p}]+[p]+s[l.select{|i|i>p}]:[]} | |
puts s["the quick brown fox jumps over the lazy dog".chars.to_a].join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.