March 2019
Intermediate to advanced
336 pages
9h 9m
English
The FibonacciNumber method takes the integer n and, by recursion, calculates the Fibonacci numbers. The following code snippet shows this recursion:
// FibonacciNumber methodfunc FibonacciNumber(n int) int { if n <= 1 { return n } return FibonacciNumber(n-1) + FibonacciNumber(n-2)}
Read now
Unlock full access