Number of ways to make change given coin values and a desired sum
Asked in the Technical phone screen stage. Given a list of distinct positive coin values and a non-negative desired sum, return the number of combinations that form the sum. Each coin can be used unlimited times, and different orders of the same coins count as one combination.
Implement def count_change(coins, amount):. Return an integer count. Return 1 when amount is 0, representing the empty combination.
def count_change(coins, amount):