mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-24 04:16:29 +08:00
fix: code comments for insertion_sort.go (#1132)
* fix: code comments for insertion_sort.go * Update insertion_sort.go --------- Co-authored-by: Prime Xiao <primexiao.dev@gmail.com> Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
parent
01c67781fa
commit
644eaf99ff
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ package chapter_sorting
|
|||
|
||||
/* 插入排序 */
|
||||
func insertionSort(nums []int) {
|
||||
// 外循环:未排序区间为 [0, i]
|
||||
// 外循环:已排序区间为 [0, i-1]
|
||||
for i := 1; i < len(nums); i++ {
|
||||
base := nums[i]
|
||||
j := i - 1
|
||||
|
|
Loading…
Reference in a new issue