Skip to content

Instantly share code, notes, and snippets.

@suewonjp
Created December 25, 2017 09:15
Show Gist options
  • Save suewonjp/2cc120d73d46a3059523ee2dd982f1b2 to your computer and use it in GitHub Desktop.
Save suewonjp/2cc120d73d46a3059523ee2dd982f1b2 to your computer and use it in GitHub Desktop.
Quicksort implementation in Python (one line)
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