From 390333bb314f6cb25adc5716ea383112860ed342 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 8 Aug 2020 13:01:36 +0100 Subject: add parallelquick and so on --- sort/selection.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sort/selection.go') diff --git a/sort/selection.go b/sort/selection.go index 3a5774f..66d221e 100644 --- a/sort/selection.go +++ b/sort/selection.go @@ -6,6 +6,7 @@ import ( func Selection(a ds.ArrayList) ds.ArrayList { length := len(a) + for i := 0; i < length; i++ { min := i for j := i + 1; j < length; j++ { @@ -20,5 +21,6 @@ func Selection(a ds.ArrayList) ds.ArrayList { a[i] = a[min] a[min] = tmp } + return a } -- cgit v1.2.3