Skip to content

Commit

Permalink
Update 0300.最长上升子序列.md
Browse files Browse the repository at this point in the history
result should be initialized to 1.
  • Loading branch information
janeyziqinglin authored May 3, 2023
1 parent f7e280e commit f80761a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion problems/0300.最长上升子序列.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Solution:
if len(nums) <= 1:
return len(nums)
dp = [1] * len(nums)
result = 0
result = 1
for i in range(1, len(nums)):
for j in range(0, i):
if nums[i] > nums[j]:
Expand Down

0 comments on commit f80761a

Please sign in to comment.