mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-08 06:32:28 +08:00
fix: fix InsertionSort bug
This commit is contained in:
@@ -37,7 +37,7 @@ func InsertionSort[T any](slice []T, comparator lancetconstraints.Comparator) []
|
||||
preIndex--
|
||||
}
|
||||
|
||||
slice[preIndex+1] = preItem
|
||||
slice[preIndex+1] = currentItem
|
||||
}
|
||||
|
||||
return slice
|
||||
|
||||
Reference in New Issue
Block a user