Step 1/0
Custom array:
Complexity
Best:O(amount·n)
Average:O(amount·n)
Worst:O(amount·n)
Space:O(amount)
Description
Finds the minimum number of coins needed to make a given amount, given an array of coin denominations.
When to use
Currency systems, vending machines, any problem requiring minimum resources to reach a target.