You are viewing a single comment's thread. Return to all comments →
Your fibonacci calculation grows exponentially.
return fetchFibonaciiValue(element-1) + fetchFibonaciiValue(element -2);
It is good to calculate fib(5), but what about fib(100) or fib(10^15), as it's specified in the requirements? Besides, you don't cache the results.
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Numbers Tree
You are viewing a single comment's thread. Return to all comments →
Your fibonacci calculation grows exponentially.
return fetchFibonaciiValue(element-1) + fetchFibonaciiValue(element -2);
It is good to calculate fib(5), but what about fib(100) or fib(10^15), as it's specified in the requirements? Besides, you don't cache the results.