Skip to content

Commit

Permalink
fix: code comments for insertion_sort.go (#1132)
Browse files Browse the repository at this point in the history
* fix: code comments for insertion_sort.go

* Update insertion_sort.go

---------

Co-authored-by: Prime Xiao <[email protected]>
Co-authored-by: Yudong Jin <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent 01c6778 commit 644eaf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codes/go/chapter_sorting/insertion_sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 644eaf9

Please sign in to comment.