mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Fix
This commit is contained in:
parent
0135da15a0
commit
bc2225df45
|
@ -31,7 +31,7 @@ def bead_sort(sequence: list) -> list:
|
|||
if any(not isinstance(x, int) or x < 0 for x in sequence):
|
||||
raise TypeError("Sequence must be list of non-negative integers")
|
||||
for _ in range(len(sequence)):
|
||||
for i in range(len(sequence)):
|
||||
for i in range(len(sequence) - 1):
|
||||
if sequence[i] > sequence[i + 1]:
|
||||
sequence[i], sequence[i + 1] = sequence[i + 1], sequence[i]
|
||||
return sequence
|
||||
|
|
Loading…
Reference in New Issue
Block a user