diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-08-08 14:06:12 +0100 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-08-08 14:06:12 +0100 |
| commit | 06c8d4c68650bbc1fc158d90a44c4c17644c7889 (patch) | |
| tree | 3b2bd79680bc233dadd93e1a2be48e00ee60b66b /sort/insertion.go | |
| parent | 44e930b71107310eae55060cf0aa2cac7089d239 (diff) | |
wrapup
Diffstat (limited to 'sort/insertion.go')
| -rw-r--r-- | sort/insertion.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sort/insertion.go b/sort/insertion.go index 983edf2..6663bca 100644 --- a/sort/insertion.go +++ b/sort/insertion.go @@ -12,7 +12,7 @@ func Insertion(a ds.ArrayList) ds.ArrayList { func insertion(a ds.ArrayList, lo, hi int) { for i := lo; i <= hi; i++ { for j := i; j > 0; j-- { - if a[j].Higher(a[j-1]) { + if a[j] > a[j-1] { break } a.Swap(j, j-1) |
