Problem set #16 -- due Wednesday 4/26
1.
The Fibonacci numbers are the following:
1, 1, 2, 3, 5, 8, 13, 21, ...
The nth Fibonacci number is defined as the sum of the previous two
Fibonacci numbers (and the first two numbers are both 1). So, the 3rd
Fibonacci number is 2, the 4th Fibonacci number is 3, etc.
Write a function called "fib" that takes a number n as a parameter
and returns the nth Fibonacci number. Your function must be a
recursive function.
2.
This function calculates the correct answer, but isn't that efficient.
Try calling your function to calculate the 100th Fibonacci number.
Why is your recursive definition so slow?