Algorithms Quiz | Dynamic Programming | Question 8

What happens when a top-down approach of dynamic programming is applied to any problem?
(A) It increases both, the time complexity and the space complexity
(B) It increases the space complexity and decreases the time complexity.
(C) It increases the time complexity and decreases the space complexity
(D) It decreases both, the time complexity and the space complexity


Answer: (B)

Explanation: As the mentioned approach uses the memoization technique it always stores the previously calculated values. Due to this, the time complexity is decreased but the space complexity is increased.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.