From f80761a43833de34dc355d48f729c64ecef63afb Mon Sep 17 00:00:00 2001 From: JaneyLin <105125897+janeyziqinglin@users.noreply.github.com> Date: Tue, 2 May 2023 23:34:57 -0400 Subject: [PATCH] =?UTF-8?q?Update=200300.=E6=9C=80=E9=95=BF=E4=B8=8A?= =?UTF-8?q?=E5=8D=87=E5=AD=90=E5=BA=8F=E5=88=97.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit result should be initialized to 1. --- problems/0300.最长上升子序列.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/0300.最长上升子序列.md b/problems/0300.最长上升子序列.md index e8cb0b5f..01d34949 100644 --- a/problems/0300.最长上升子序列.md +++ b/problems/0300.最长上升子序列.md @@ -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]: