Question

The Fibonacci sequence (F(n) = F(n-1) + F(n-2)) is a classic example demonstrating the benefits of Dynamic Programming. Without DP, a naive recursive solution suffers from:

A Stack overflow for small 'N'.
B High space complexity due to large array storage.
C Recomputing the same subproblems multiple times.
D Inability to handle negative numbers.
E Incorrect results for large 'N'.
Practice Next

Hey! Ask a query