diff options
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 |
