Skip to content

Commit 67a08fa

Browse files
Update CoinChangeDP.py
1 parent 2a138f2 commit 67a08fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dynamic Programming/CoinChangeDP/CoinChangeDP.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def count(S, m, n ):
1313
# If n is less than 0 then no
1414
# solution exists
1515
if (n < 0):
16-
return 0;
16+
return 0
1717

1818
# If there are no coins and n
1919
# is greater than 0, then no
@@ -23,7 +23,7 @@ def count(S, m, n ):
2323

2424
# count is sum of solutions (i)
2525
# including S[m-1] (ii) excluding S[m-1]
26-
return count( S, m - 1, n ) + count( S, m, n-S[m-1] );
26+
return count( S, m - 1, n ) + count( S, m, n-S[m-1] )
2727

2828
# Driver program to test above function
2929
arr = [1, 2, 3]

0 commit comments

Comments
 (0)