InsertSort
This commit is contained in:
parent
4e0649eee5
commit
74a8bedb3d
@ -27,6 +27,8 @@ func InsertSort(a []int) {
|
||||
for ; j >= 0; j-- {
|
||||
if a[j] > v {
|
||||
a[j+1] = a[j]
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
a[j+1] = v
|
||||
|
Loading…
Reference in New Issue
Block a user