Skip to content

Commit 0d47186

Browse files
Coin Change
1 parent b2fd9af commit 0d47186

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'''
2+
Given a target amount n and a list (array) of distinct coin values,
3+
what's the fewest coins needed to make the change amount.
4+
5+
For example:
6+
7+
If n = 10 and coins = [1,5,10]. Then there are 4 possible ways to make change:
8+
9+
1+1+1+1+1+1+1+1+1+1
10+
11+
5 + 1+1+1+1+1
12+
13+
5+5
14+
15+
10
16+
17+
With 1 coin being the minimum amount.
18+
'''

0 commit comments

Comments
 (0)