Computing the Nth Fibonacci Number Efficiently
Easy algorithms interview practice: Computing the Nth Fibonacci Number Efficiently.
You need to compute $F_n$, the $n$th Fibonacci number (with $F_0=0, F_1=1$), for very large $n$. Which approach achieves the optimal time complexity?