Created
December 25, 2017 09:15
-
-
Save suewonjp/2cc120d73d46a3059523ee2dd982f1b2 to your computer and use it in GitHub Desktop.
Quicksort implementation in Python (one line)
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
f = lambda x: (f([y for y in x if x[0] > y]) + [y for y in x if x[0] == y] + f([y for y in x if x[0] < y]) if x else []) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment