diff --git a/problems/0300.最长上升子序列.md b/problems/0300.最长上升子序列.md index 677c72c6..64f75291 100644 --- a/problems/0300.最长上升子序列.md +++ b/problems/0300.最长上升子序列.md @@ -130,7 +130,7 @@ public: class Solution { public int lengthOfLIS(int[] nums) { int[] dp = new int[nums.length]; - int res = 0; + int res = 1; Arrays.fill(dp, 1); for (int i = 1; i < dp.length; i++) { for (int j = 0; j < i; j++) {