Minimum bills to pay amount due
Suppose you're given an array of currency bills at varying values along with an integer representing an amount of money owed.
Given these inputs, write a function to return the fewest # of bills that are needed to pay the amount due. If the amount can not be paid with the bills shown, return 'Not possible'.
You can assume you have an infinite number of each kind of bill.
Input: bills = [1,2,5], amount = 15 Output: 3 (15 = 5 + 5 + 5) Input: bills = , amount = 5 Output: Not possible
Subscribe to premium account to see the solution.Get premium now