Computing the n-th Fibonacci number by iteration takes O(n) steps. With fast matrix exponentiation, it takes O(log n) matrix multiplications:
Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.
Start 7-day free trial