Coin Change - I: Maximum Number of Ways
Medium

Problem Statement

Find the number of ways to make change for amount W using given coin denominations of infinite supply.

Examples

1Example 1
Input:
{ "coins": [ 1, 2, 3 ], "W": 4 }
Output:
4
2Example 2
Input:
{ "coins": [ 2, 5, 3, 6 ], "W": 10 }
Output:
5
3Example 3
Input:
{ "coins": [ 1 ], "W": 5 }
Output:
1
Loading...

Sign in to Run Code and Submit