Question: What is the space complexity of the dynamic programming solution for the Fibonacci sequence?
Options:
Correct Answer: O(n)
Solution:
The space complexity of the dynamic programming solution for the Fibonacci sequence can be optimized to O(1) by storing only the last two computed values.