From 06c8d4c68650bbc1fc158d90a44c4c17644c7889 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 8 Aug 2020 14:06:12 +0100 Subject: wrapup --- sort/insertion.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sort/insertion.go') 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) -- cgit v1.2.3