diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-08-08 16:00:07 +0100 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-08-08 16:00:07 +0100 |
| commit | 719321d413bcc61e56786399799a9c80e94ab5d8 (patch) | |
| tree | d97d67fd8b1b42f625c91a9f0c8d6b29819824e0 /sort/selection.go | |
| parent | b8c45f87d6f7251701f95eb6b8ac1efd4255d298 (diff) | |
fortune not found
Quick commit
Diffstat (limited to 'sort/selection.go')
| -rw-r--r-- | sort/selection.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sort/selection.go b/sort/selection.go index 781292a..a28437c 100644 --- a/sort/selection.go +++ b/sort/selection.go @@ -5,11 +5,11 @@ import ( ) func Selection(a ds.ArrayList) ds.ArrayList { - length := len(a) + l := len(a) - for i := 0; i < length; i++ { + for i := 0; i < l; i++ { min := i - for j := i + 1; j < length; j++ { + for j := i + 1; j < l; j++ { if a[min] > a[j] { min = j } |
