I\'m trying to recall an algorithm on Fibonacci recursion. The following:
public int fibonacci(int n) {
if(n == 0)
return 0;
else if(n == 1)
ret
You need to memorize the calculated value in order to stop exponential growth.
Here is an working example for faster recursion using memory.
Calculating fibonacci number