summaryrefslogtreecommitdiff
path: root/sort/selection.go
diff options
context:
space:
mode:
Diffstat (limited to 'sort/selection.go')
-rw-r--r--sort/selection.go6
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
}