From 3becfab93f477723e4c3aee75da45989bebd0bb6 Mon Sep 17 00:00:00 2001 From: Terry Liu <102352821+Lozakaka@users.noreply.github.com> Date: Thu, 15 Jun 2023 17:58:09 -0400 Subject: [PATCH] =?UTF-8?q?=E8=AA=AA=E6=98=8EJAVA=20code=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=B3=A8=E6=84=8F=E7=9A=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0674.最长连续递增序列.md | 1 + 1 file changed, 1 insertion(+) diff --git a/problems/0674.最长连续递增序列.md b/problems/0674.最长连续递增序列.md index 81f02ace..8cc270ec 100644 --- a/problems/0674.最长连续递增序列.md +++ b/problems/0674.最长连续递增序列.md @@ -177,6 +177,7 @@ Java: dp[i] = 1; } int res = 1; + //可以注意到,這邊的 i 是從 0 開始,所以會出現和卡哥的C++ code有差異的地方,在一些地方會看到有 i + 1 的偏移。 for (int i = 0; i < nums.length - 1; i++) { if (nums[i + 1] > nums[i]) { dp[i + 1] = dp[i] + 1;