From 341b0aa672e9ca2d8a5b1cea2bc5ba307e795eda Mon Sep 17 00:00:00 2001 From: fwqaaq Date: Mon, 17 Apr 2023 10:37:39 +0800 Subject: [PATCH] =?UTF-8?q?Update=20problems/0746.=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=9C=80=E5=B0=8F=E8=8A=B1=E8=B4=B9=E7=88=AC=E6=A5=BC=E6=A2=AF?= =?UTF-8?q?.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0746.使用最小花费爬楼梯.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0746.使用最小花费爬楼梯.md b/problems/0746.使用最小花费爬楼梯.md index f11439c0..31e7bd48 100644 --- a/problems/0746.使用最小花费爬楼梯.md +++ b/problems/0746.使用最小花费爬楼梯.md @@ -318,7 +318,7 @@ func min(a, b int) int { var minCostClimbingStairs = function(cost) { const dp = [0, 0] for (let i = 2; i <= cost.length; ++i) { - dp[i] = Math.min(dp[i -1] + cost[i - 1], dp[i - 2] + cost[i - 2]) + dp[i] = Math.min(dp[i - 1] + cost[i - 1], dp[i - 2] + cost[i - 2]) } return dp[cost.length] };