Revert "Update bubble_sort.py"

This commit is contained in:
Anup Kumar Panwar 2016-08-26 17:16:03 +05:30 committed by GitHub
parent abd9d78a62
commit a04d5c5e1e

View File

@ -30,7 +30,7 @@ def bubble_sort(collection):
[-45, -5, -2] [-45, -5, -2]
""" """
length = len(collection) length = len(collection)
for i in range(length-1): for i in range(length):
for j in range(length-1): for j in range(length-1):
if collection[j] > collection[j+1]: if collection[j] > collection[j+1]:
collection[j], collection[j+1] = collection[j+1], collection[j] collection[j], collection[j+1] = collection[j+1], collection[j]