Fewest Coins for Change

Talk it through out loud with your AI coach.

The problem

  • medium
  • Pro

Given coin values, such as one, three and four, and an amount, find the fewest coins that add up to the amount, using as many of each coin as you like, or say it's impossible. Explain why always taking the largest coin can fail, and how you'd solve it.