Skip to content

Commit 021a12d

Browse files
Sachinn-64Copilot
andauthored
Update dynamic_programming/coin_change.r
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f4a0c6b commit 021a12d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

dynamic_programming/coin_change.r

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ coin_change <- function(coins, amount) {
2121

2222
# Initialize DP array
2323
dp <- rep(Inf, amount + 1)
24-
dp[1] <- 0
2524
dp[0 + 1] <- 0 # zero coins needed for amount 0
2625

2726
for (i in 1:amount) {

0 commit comments

Comments
 (0)