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
πŸ’¬ Discuss
βœ… Correct 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.

Explanation by: Mr. Dubey
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.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
622
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate