What is the main advantage of using dynamic programming compared to a naive…

2024

What is the main advantage of using dynamic programming compared to a naive recursive approach ?

  1. A.

    It uses less memory

  2. B.

    It requires less input data

  3. C.

    It avoids redundant calculations

  4. D.

    It guarantees faster execution time

Attempted by 98 students.

Show answer & explanation

Correct answer: C

Dynamic programming improves efficiency by storing intermediate results to avoid redundant calculations.

Explore the full course: Tpsc Assistant Technical Officer