We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80b2aa5 commit 46a2aebCopy full SHA for 46a2aeb
1 file changed
Dynamic-Programming/CoinChange.js
@@ -1,4 +1,4 @@
1
-function change(coins, amount) {
+function change (coins, amount) {
2
const combinations = new Array(amount + 1).fill(0)
3
combinations[0] = 1
4
@@ -52,7 +52,7 @@ const coinChangeComb = (amount, coins, idx, mem) => {
52
return res
53
}
54
55
-function minimumCoins(coins, amount) {
+function minimumCoins (coins, amount) {
56
// minimumCoins[i] will store the minimum coins needed for amount i
57
const minimumCoins = new Array(amount + 1).fill(0)
58
@@ -78,7 +78,7 @@ function minimumCoins(coins, amount) {
78
return minimumCoins[amount]
79
80
81
-function main() {
+function main () {
82
const amount = 12
83
const coins = [2, 4, 5]
84
console.log(
0 commit comments