Skip to content

Commit 89b94a8

Browse files
author
Christian Bender
authored
Merge pull request TheAlgorithms#456 from ravidesai47/master
Good Work!
2 parents 058b990 + ddb7614 commit 89b94a8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Dynamic Programming/CoinChange.java

-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ public static int change(int[] coins, int amount) {
2929

3030
for (int coin : coins) {
3131
for (int i=coin; i<amount+1; i++) {
32-
if (i>=coin) {
3332
combinations[i] += combinations[i-coin];
34-
}
3533
}
3634
// Uncomment the below line to see the state of combinations for each coin
3735
// printAmount(combinations);

0 commit comments

Comments
 (0)