Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b794dcc

Browse files
Update 0674.最长连续递增序列.md
1 parent ae3fc9f commit b794dcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0674.最长连续递增序列.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class Solution:
212212
return 0
213213
result = 1
214214
dp = [1] * len(nums)
215-
for i in range(len(nums)):
215+
for i in range(len(nums)-1):
216216
if nums[i+1] > nums[i]: #连续记录
217217
dp[i+1] = dp[i] + 1
218218
result = max(result, dp[i+1])

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /