We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a6349b commit 98cc298Copy full SHA for 98cc298
sorts/selection_sort.py
@@ -31,7 +31,7 @@ def selection_sort(collection):
31
"""
32
33
length = len(collection)
34
- for i in range(length):
+ for i in range(length - 1):
35
least = i
36
for k in range(i + 1, length):
37
if collection[k] < collection[least]:
0 commit comments