InsertSort

This commit is contained in:
吴磊 2018-10-16 17:26:02 +08:00
parent 4e0649eee5
commit 74a8bedb3d

View File

@ -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