summaryrefslogtreecommitdiff
path: root/sort/parallelquick.go
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2020-08-08 16:00:07 +0100
committerPaul Buetow <pbuetow@mimecast.com>2020-08-08 16:00:07 +0100
commit719321d413bcc61e56786399799a9c80e94ab5d8 (patch)
treed97d67fd8b1b42f625c91a9f0c8d6b29819824e0 /sort/parallelquick.go
parentb8c45f87d6f7251701f95eb6b8ac1efd4255d298 (diff)
fortune not found
Quick commit
Diffstat (limited to 'sort/parallelquick.go')
-rw-r--r--sort/parallelquick.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/sort/parallelquick.go b/sort/parallelquick.go
index 2ac9f0e..cde4b5e 100644
--- a/sort/parallelquick.go
+++ b/sort/parallelquick.go
@@ -12,15 +12,15 @@ func ParallelQuick(a ds.ArrayList) ds.ArrayList {
}
func parallelQuick(a ds.ArrayList) {
- length := len(a)
- if length <= 10 {
+ l := len(a)
+ if l <= 10 {
Insertion(a)
return
}
j := quickPartition(a)
- if length >= 1000 {
+ if l >= 1000 {
var wg sync.WaitGroup
wg.Add(2)
defer wg.Wait()