7. Why is naive recursive Fibonacci slow, and how does memoization fix it?
MediumRecursion & backtracking
Technical
Show model answer
fib(n) = fib(n−1) + fib(n−2) recomputes the same values exponentially many times: about O(φⁿ) calls. Memoization caches each result the first time, so every fib(k) is computed once and the total is O(n).