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 ?

Answer: C. It avoids redundant calculationsDynamic programming improves efficiency by storing intermediate results to avoid redundant calculations.

  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 261 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

Loading lesson…