Skip to content

Instantly share code, notes, and snippets.

@rjshekar90
Created February 5, 2017 11:46
Show Gist options
  • Save rjshekar90/b52a2848a7a2f9659ca5bde2cdfc12d5 to your computer and use it in GitHub Desktop.
Save rjshekar90/b52a2848a7a2f9659ca5bde2cdfc12d5 to your computer and use it in GitHub Desktop.
def bubbleSort(lst):
nums = list(lst)
for i in range(len(lst)):
for j in range(i+1, len(lst)):
if lst[j] < lst[i]:
lst[j], lst[i] = lst[i], lst[j]
return lst
print bubbleSort([100,90,80,70,2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment