Coin Change II
You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the number of combinations that make up that amount. If that amount of money cannot be made up by any combination of the coins, return 0.
Coin Change II

You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the number of combinations that make up that amount. If that amount of money cannot be made up by any combination of the coins, return 0.

Example 1:
Input: {"amount":5,"coins":[1,2,5]}
Output: 4
Input
arr ={"amount":5,"coins":[1,2,5]}

Initialize dp[0] = 1 (one way to make amount 0)

Available Coins

1

2

5

DP Array (ways to make amount i)

1

$0

0

$1

0

$2

0

$3

0

$4

0

$5

Current

Has ways

Active coin

Variables
No variables to display
DepthFunction Call
Stack empty
0/11