From 719321d413bcc61e56786399799a9c80e94ab5d8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 8 Aug 2020 16:00:07 +0100 Subject: fortune not found Quick commit --- sort/shell.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sort/shell.go') diff --git a/sort/shell.go b/sort/shell.go index 4a8fded..5fab584 100644 --- a/sort/shell.go +++ b/sort/shell.go @@ -5,17 +5,17 @@ import ( ) func Shell(a ds.ArrayList) ds.ArrayList { - length := len(a) + l := len(a) // h-sort the array h := 1 - for h < length/3 { + for h < l/3 { // 1, 4, 13, 40, 121, 364, 1093... h = 3*h + 1 } for h >= 1 { - for i := h; i < length; i++ { + for i := h; i < l; i++ { for j := i; j >= h; j -= h { if a[j-h] < a[j] { break -- cgit v1.2.3