Deposit combinations
Your task
A savings app lets users schedule deposits only in fixed amounts, for example 1, 2, and 5 dollars, with unlimited uses of each. Given the list of distinct positive deposit amounts and a savings goal, return how many different combinations of deposits reach the goal exactly. Two combinations are the same if they use each amount the same number of times; order does not matter. A goal of 0 has exactly one combination: deposit nothing.
Examples
count_deposit_mixes(amounts: list[int], goal: int) -> intExample 1
Input
count_deposit_mixes([1, 2, 5], 5)Output
4Example 2
Input
count_deposit_mixes([2, 3], 12)Output
3