Created
May 28, 2014 17:50
-
-
Save wethinkagile/0190243edac24195e7a4 to your computer and use it in GitHub Desktop.
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
def bubbleSort(aList): | |
for eachNum in range(len(aList)-1,0,-1): | |
for i in range(eachNum): | |
if (aList[i] > aList[i+1]): | |
temp = aList[i] | |
aList[i] = aList[i+1] | |
aList[i+1] = temp | |
return aList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment