Skip to content

Revert "Update bubble_sort.py" - #231

Merged
harshildarji merged 2 commits into
masterfrom
revert-22-patch-1
Jan 20, 2018
Merged

harshildarji merged 2 commits into
masterfrom
revert-22-patch-1

Conversation

@sahilmalhotra24

Copy link
Copy Markdown

def bubbleSort(alist):
for passnum in range(len(alist)-1,0,-1):
for i in range(passnum):
if alist[i]>alist[i+1]:
temp = alist[i]
alist[i] = alist[i+1]
alist[i+1] = temp

alist = [54,26,93,17,77,31,44,55,20]
bubbleSort(alist)
print(alist)

@harshildarji
harshildarji merged commit bfd52df into master Jan 20, 2018
@harshildarji
harshildarji deleted the revert-22-patch-1 branch October 19, 2018 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants