Recursion: Fibonacci
easy 16 minFibonacci is the classic example of tree recursion: fib(n) = fib(n - 1) + fib(n - 2) with base cases fib(0) = 0 and fib(1) = 1.
Fibonacci is the classic example of tree recursion: fib(n) = fib(n - 1) + fib(n - 2) with base cases fib(0) = 0 and fib(1) = 1.