summaryrefslogtreecommitdiff
path: root/sort/insertion.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2020-08-06 11:18:13 +0100
committerPaul Buetow <paul@buetow.org>2020-08-06 11:18:13 +0100
commitf8cd759c94be1f0daeba46940fac0ca3d4201388 (patch)
tree817149e0a1fa331e4d9f74e55910c6dd0d9bc802 /sort/insertion.go
parentd330522b31f9a32e9549745008b596fdca9b17e5 (diff)
parentddee1778446fbdf17587fed5ba2b6edc76c05b69 (diff)
merge
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 9f7215b..3e271b0 100644
--- a/sort/insertion.go
+++ b/sort/insertion.go
@@ -12,7 +12,7 @@ func Insertion(a ds.ArrayList) ds.ArrayList {
if a[j].Higher(a[j-1]) {
break
}
- a.SwapPos(j, j-1)
+ a.Swap(j, j-1)
}
}