Skip to content

Instantly share code, notes, and snippets.

@firaja
Created March 22, 2018 07:21
Show Gist options
  • Save firaja/a8b772a422c02183744aae9417c62b4c to your computer and use it in GitHub Desktop.
Save firaja/a8b772a422c02183744aae9417c62b4c to your computer and use it in GitHub Desktop.
Python one line Quicksort algorithm
qs = lambda l: [] if not l else qs(filter(lambda x: x <= l[0], l[1:])) + [l[0]] + qs(filter(lambda x: x > l[0], l[1:]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment