We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4569955 commit ab8340cCopy full SHA for ab8340c
sorts/bubble_sort.py
@@ -30,7 +30,7 @@ def bubble_sort(collection):
30
[-45, -5, -2]
31
"""
32
length = len(collection)
33
- for i in range(length):
+ for i in range(length-1):
34
for j in range(length-1):
35
if collection[j] > collection[j+1]:
36
collection[j], collection[j+1] = collection[j+1], collection[j]
0 commit comments