Skip to content

Commit f131bfd

Browse files
committed
fix typo
1 parent 766faf0 commit f131bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

21-selection-sort.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# 给定一数组内含数字,请实作选择排序法进行排序。
22
# https://zh.wikipedia.org/wiki/选择排序
33

4-
def insertion_sort(arr)
4+
def selection_sort(arr)
55
#...
66
end
77

88
arr = [7, 68, 42, 46, 9, 91, 77, 46, 86, 1]
99

10-
answer = insertion_sort(arr)
10+
answer = selection_sort(arr)
1111

1212
puts answer.to_s # 应该是 [1, 7, 9, 42, 46, 46, 68, 77, 86, 91]

0 commit comments

Comments
 (0)