Coin Change II

You are given an integer array coins, where each value represents a coin denomination, and an integer amount, which is the total amount of money you want to form.

Return the number of different combinations that add up to amount. If no combination can form the total, return 0.

Combinations are order-independent, so [1, 2] and [2, 1] count as the same combination. When amount is 0 the empty selection is the single valid way to reach the total, so the answer is 1.

You have an unlimited supply of each coin denomination. The answer fits in a signed 32-bit integer.

Examples
Input: [0,[1]]
Output: 1
Hints

Coin Change II

You are given an integer array `coins`, where each value represents a coin denomination, and an integer `amount`, which is the total amount of money you want to form.