Fibonacci: recursive and iterative.
Anonymous
// Iterative public static long getFibIterative(int n){ int prev1 = 1; int prev2 = 1; // it's like 1 1 2 3 5 8 // prev1, prev2, 2 3 5 8 // let i be the index for(int i=2; i
Check out your Company Bowl for anonymous work chats.