You are viewing a single comment's thread. Return to all comments →
Is it too naive approach?
public static int Fibonacci(int n) { int a = 0, b = 1, c=0; for (int i = 0; i < n-1; i++) { c = a + b; a = b; b = c; } return c; }
Seems like cookies are disabled on this browser, please enable them to open this website
Recursion: Fibonacci Numbers
You are viewing a single comment's thread. Return to all comments →
Is it too naive approach?