diff --git a/problems/背包理论基础01背包-1.md b/problems/背包理论基础01背包-1.md index a844dcf5..d6bc5520 100644 --- a/problems/背包理论基础01背包-1.md +++ b/problems/背包理论基础01背包-1.md @@ -413,7 +413,7 @@ else dp[i][j] = Math.max(dp[i-1][j], dp[i-1][j - weight[i]] + value[i]); return dp[len-1][size] //满足条件的最大值 } -function testWeightBagProblem2 (wight, value, size)4 { +function testWeightBagProblem2 (wight, value, size) { const len = wight.length, dp = Array(size + 1).fill(0); for(let i = 1; i <= len; i++) {