Skip to content

Commit 4afc3b5

Browse files
authored
Merge pull request apachecn#57 from xzycn/patch-1
Fixed the wrong position
2 parents 8c97d97 + d1ed4a6 commit 4afc3b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/py3.x/sort/BubbleSort.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
# 冒泡排序
5-
# 1. 外层循环负责帮忙递减内存循环的次数【len-1, 1】
5+
# 1. 外层循环负责帮忙递减内存循环的次数【1, len-1】
66
# 2. 内层循环负责前后两两比较, index 的取值范围【0, len-2】 len-1-i 次,求最大值放到最后
77
def bubble_sort(nums):
88
# [1, len-1]

0 commit comments

Comments
 (0)