Your question is Fewest Bills and Coins. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
In an Inspire11 payment workflow, determine how to provide exact change using the fewest available bills and coins. Given an amount in cents and a list of available denominations, return how many of each denomination to use.
Implement make_change(amount, denominations). The result must be a list whose length matches denominations; element i is the number of coins or bills with value denominations[i]. Return None when the amount cannot be formed. Any representation using the minimum total number of items is valid.
amount: a nonnegative integer representing cents.denominations: a list of distinct positive integers representing cents.None if no exact representation exists.def make_change(amount, denominations):