I am interested in an iterative algorithm for Fibonacci numbers, so I found the formula on wiki...it looks straight forward so I tried it in Python...it doesn\'t have a prob
This work (intuitively)
def fib(n): if n < 2: return n o,i = 0,1 while n > 1: g = i i = o + i o = g n -= 1 return i