mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 09:45:04 +08:00
@ -29,9 +29,7 @@ public class CoinChange {
|
||||
|
||||
for (int coin : coins) {
|
||||
for (int i=coin; i<amount+1; i++) {
|
||||
if (i>=coin) {
|
||||
combinations[i] += combinations[i-coin];
|
||||
}
|
||||
}
|
||||
// Uncomment the below line to see the state of combinations for each coin
|
||||
// printAmount(combinations);
|
||||
|
Reference in New Issue
Block a user