summaryrefslogtreecommitdiff
path: root/sort/selection.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-08-08 14:06:12 +0100
committerPaul Buetow <pbuetow@mimecast.com>2020-08-08 14:06:12 +0100
commit06c8d4c68650bbc1fc158d90a44c4c17644c7889 (patch)
tree3b2bd79680bc233dadd93e1a2be48e00ee60b66b /sort/selection.go
parent44e930b71107310eae55060cf0aa2cac7089d239 (diff)
wrapup
Diffstat (limited to 'sort/selection.go')
-rw-r--r--sort/selection.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sort/selection.go b/sort/selection.go
index 66d221e..798fa27 100644
--- a/sort/selection.go
+++ b/sort/selection.go
@@ -10,7 +10,7 @@ func Selection(a ds.ArrayList) ds.ArrayList {
for i := 0; i < length; i++ {
min := i
for j := i + 1; j < length; j++ {
- if a[min].Higher(a[j]) {
+ if a[min] > a[j] {
min = j
}
}