diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-08-08 15:57:37 +0100 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-08-08 15:57:37 +0100 |
| commit | b8c45f87d6f7251701f95eb6b8ac1efd4255d298 (patch) | |
| tree | 6076a23ec57d75c57bd2a5556afbf9c94a32d23f /sort/selection.go | |
| parent | ae7d31d6b6d735810ea27b788491d291754374aa (diff) | |
refactor
Diffstat (limited to 'sort/selection.go')
| -rw-r--r-- | sort/selection.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sort/selection.go b/sort/selection.go index 798fa27..781292a 100644 --- a/sort/selection.go +++ b/sort/selection.go @@ -17,9 +17,7 @@ func Selection(a ds.ArrayList) ds.ArrayList { if min == i { continue } - tmp := a[i] - a[i] = a[min] - a[min] = tmp + a.Swap(i, min) } return a |
