Last active
October 26, 2024 09:03
-
-
Save wanysteus/52f2096461ea7cbbd7c006e4df15c4ef to your computer and use it in GitHub Desktop.
QuickSort, condensed version
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
| def quicksort(L): | |
| return L if len(L) <= 1 else quicksort([e for e in L[1:] if e <= L[0]]) + [L[0]] + quicksort([e for e in L[1:] if e > L[0]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment