solution.py
⌘↵ runLoading...
Coin Change
mediumYou'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