From 0c6d4ed2e499e3e17165e43803d0d1c6dd0956d9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 2 Apr 2023 20:22:13 +0300 Subject: initial generics --- sort/parallelquick.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sort/parallelquick.go') 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 { -- cgit v1.2.3