Skip to content

Instantly share code, notes, and snippets.

@wethinkagile
Created May 28, 2014 17:50
Show Gist options
  • Save wethinkagile/0190243edac24195e7a4 to your computer and use it in GitHub Desktop.
Save wethinkagile/0190243edac24195e7a4 to your computer and use it in GitHub Desktop.
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