mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 23:28:29 +08:00
@ -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;
|
||||
|
Reference in New Issue
Block a user