Created
June 23, 2016 07:15
-
-
Save narendranathjoshi/f779b821ced3ca44780b7e5380b80560 to your computer and use it in GitHub Desktop.
Quick Sort One Liner in Python
This file contains 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
qsort = lambda l : [x for x in l[1:] if x < l[0]] + [l[0]] + [x for x in l[1:] if x >= l[0]] | |
#usage | |
qsort([7,5,2,8]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment