From 3dca406fdeaf39594c97e774c41f132c3402749f Mon Sep 17 00:00:00 2001 From: Xavier Petit <32063953+xpetit@users.noreply.github.com> Date: Sun, 26 Apr 2020 14:11:34 +0200 Subject: [PATCH] Remove useless functions --- tests/go/solutions/fib.go | 16 ---------------- tests/go/solutions/fib/main.go | 16 ---------------- 2 files changed, 32 deletions(-) diff --git a/tests/go/solutions/fib.go b/tests/go/solutions/fib.go index c05fd9b89..c788cde50 100644 --- a/tests/go/solutions/fib.go +++ b/tests/go/solutions/fib.go @@ -1,21 +1,5 @@ package correct -func rec(a, b, cnt int) int { - if a > b { - return -1 - } - if a == b { - return cnt - } - if rec(a*2, b, cnt+1) != -1 { - return rec(a*2, b, cnt+1) - } - if rec(a*3, b, cnt+1) != -1 { - return rec(a*3, b, cnt+1) - } - return -1 -} - func Fib(n int) int { if n <= 0 { return 0 diff --git a/tests/go/solutions/fib/main.go b/tests/go/solutions/fib/main.go index 8469c14e6..dae08fbc8 100644 --- a/tests/go/solutions/fib/main.go +++ b/tests/go/solutions/fib/main.go @@ -1,21 +1,5 @@ package main -func rec(a, b, cnt int) int { - if a > b { - return -1 - } - if a == b { - return cnt - } - if rec(a*2, b, cnt+1) != -1 { - return rec(a*2, b, cnt+1) - } - if rec(a*3, b, cnt+1) != -1 { - return rec(a*3, b, cnt+1) - } - return -1 -} - func Fib(n int) int { if n <= 0 { return 0