mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
Update bubble_sort.py (#535)
This commit is contained in:
parent
f0d5bc6ece
commit
ce0a013ad7
|
@ -17,6 +17,9 @@ def bubble_sort(collection):
|
|||
|
||||
>>> bubble_sort([-2, -5, -45])
|
||||
[-45, -5, -2]
|
||||
|
||||
>>> bubble_sort([-23,0,6,-4,34])
|
||||
[-23,-4,0,6,34]
|
||||
"""
|
||||
length = len(collection)
|
||||
for i in range(length-1):
|
||||
|
|
Loading…
Reference in New Issue
Block a user