Update 0674.最长连续递增序列.md

This commit is contained in:
JaneyLin 2023-05-03 21:05:55 -04:00 committed by GitHub
parent ae3fc9f576
commit b794dccc5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ class Solution:
return 0
result = 1
dp = [1] * len(nums)
for i in range(len(nums)):
for i in range(len(nums)-1):
if nums[i+1] > nums[i]: #连续记录
dp[i+1] = dp[i] + 1
result = max(result, dp[i+1])