The Fibonacci numbers: F(0)=0, F(1)=1, F(n)=F(n-1)+F(n-2). Given n, return F(n).
Instead of recursive calls, we build the sequence iteratively. We only need the last two values (a, b) to compute the next, so no memoization array is needed — O(1) space.