From 0694fac15bf6b7d18a53adc9f6ad0c33b51db016 Mon Sep 17 00:00:00 2001 From: JackZJ <56966563+laerpeeK@users.noreply.github.com> Date: Thu, 28 Apr 2022 08:30:30 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E8=83=8C=E5=8C=85=E7=90=86=E8=AE=BA?= =?UTF-8?q?=E5=9F=BA=E7=A1=8001=E8=83=8C=E5=8C=85JavaScript=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新背包理论基础01背包JavaScript代码块 - 二维数组做法1, 目前主线上的是有问题的。 --- problems/背包理论基础01背包-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) {