Created
December 11, 2011 16:53
-
-
Save mahmoudhossam/1461524 to your computer and use it in GitHub Desktop.
A quicksort implementation in python.
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(lst): | |
for i in range(len(lst)): | |
for j in range(i,len(lst)): | |
if lst[i] > lst[j]: | |
lst[i], lst[j] = lst[j], lst[i] | |
return lst |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment