The Fibonacci sequence is the series of integers.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ....
See the pattern? Each element in the series is the sum of the preceding two elements. Here is a recursive formula for calculating the nth number of the sequence:
Fib (N) = {N, if N=0or 1
Fib (N-2) +Fib (N-1), if N>1
a. Write a recursive method Fibonacci that returns the nth Fibonacci number when passed the argument n.
b. Write a non-recursive version of the method Fibonacci.
c. Write a driver to test your two version of the method Fibonacci.
d. Compare the recursive and iterative version for efficiency. (Use words, not Big-o notation.)