summaryrefslogtreecommitdiff
path: root/sort/insertion.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2020-07-15 08:28:21 +0100
committerPaul Buetow <paul@buetow.org>2020-07-15 08:28:21 +0100
commite6e3b27756974ad7255345c98260918a96f3a476 (patch)
treed56e404ca6724a64116aa10cb147161f8e7fcff2 /sort/insertion.go
parent73ca4d0b86036a41b452212702e6aa669888d740 (diff)
fix shell sort
Diffstat (limited to 'sort/insertion.go')
-rw-r--r--sort/insertion.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sort/insertion.go b/sort/insertion.go
index d14c275..8e4af30 100644
--- a/sort/insertion.go
+++ b/sort/insertion.go
@@ -9,7 +9,7 @@ func Insertion(a []ds.Comparer) []ds.Comparer {
for i := 0; i < length; i++ {
for j := i; j > 0; j-- {
- if a[j].HigherThan(a[j-1]) {
+ if a[j].Higher(a[j-1]) {
break
}
tmp := a[j]