In dynamic programming, the _______ array is used to store the minimum number of coins required for each _______ value.

  • Result, denomination
  • Optimal, target
  • Memory, sum
  • Table, value
The correct option is "Table, value." In dynamic programming, a table (or array) is used to store intermediate results, and in the coin change problem, it is employed to store the minimum number of coins required for each target value. This dynamic programming approach avoids redundant calculations and improves efficiency.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *