Dynamic ProgrammingCoin Change
Progress
solution.py
⌘↵ run
Loading...

Coin Change

medium
You've got this! Start small, think out loud.

Given an integer array `coins` representing coin denominations and an integer `amount`, return the fewest number of coins needed to make up that amount. If not possible, return -1.

Time:O(n * amount)
Space:O(amount)
dpunbounded-knapsackgoogle-favorite
OUTPUT

Run your code to see output