Back to DSA sheet

Coin Change

MediumDynamic Programming
Open on LeetCodeAmazonGoogleMeta

Return the fewest number of coins needed to make a given amount, or -1 if it cannot be made.

Constraints
  • 1 <= coins.length <= 12
  • 0 <= amount <= 10^4
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250
coin-change.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.