summaryrefslogtreecommitdiff
path: root/sort/parallelquick.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-04-02 20:22:13 +0300
committerPaul Buetow <paul@buetow.org>2023-04-02 20:22:13 +0300
commit0c6d4ed2e499e3e17165e43803d0d1c6dd0956d9 (patch)
tree6d6a5df53d1dd3e655d24f0423f24bc52ad9784c /sort/parallelquick.go
parentf78ba2cdc6840dbc52a27a2f9fac28f3b61e8b7b (diff)
initial generics
Diffstat (limited to 'sort/parallelquick.go')
-rw-r--r--sort/parallelquick.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/sort/parallelquick.go b/sort/parallelquick.go
index ae203f2..5763efc 100644
--- a/sort/parallelquick.go
+++ b/sort/parallelquick.go
@@ -6,13 +6,13 @@ import (
"codeberg.org/snonux/algorithms/ds"
)
-func ParallelQuick(a ds.ArrayList) ds.ArrayList {
+func ParallelQuick[V ds.Number](a ds.ArrayList[V]) ds.ArrayList[V] {
//Shuffle(a)
parallelQuick(a)
return a
}
-func parallelQuick(a ds.ArrayList) {
+func parallelQuick[V ds.Number](a ds.ArrayList[V]) {
l := len(a)
if l < 1000 {