![Mcqmate logo](https://mcqmate.com/public/images/logos/logo-black.png)
![Mcqmate logo](https://mcqmate.com/public/images/logos/logo-white.png)
McqMate
Q. |
When a top-down approach of dynamic programming is applied to a problem, it usually |
A. | decreases both, the time complexity and the space complexity |
B. | decreases the time complexity and increases the space complexity |
C. | increases the time complexity and decreases the space complexity |
D. | increases both, the time complexity and the space complexity |
Answer» B. decreases the time complexity and increases the space complexity | |
Explanation: the top-down approach uses the memoization technique which stores the previously calculated values. due to this, the time complexity is decreased but the space complexity is increased. |
View all MCQs in
Design and Analysis of AlgorithmsNo comments yet