Write an algorithm to compute the nth fibonacci number
Anonymous
A better solution would be to solve this with dynamic programming. Keep track of the previous 2 numbers to get the next in the sequence. This cuts down the complexity from O(n^2) in the recursive approach to O(n).
Check out your Company Bowl for anonymous work chats.