题目
https://leetcode-cn.com/problems/longest-increasing-subsequence/
思路

代码
class Solution:def lengthOfLIS(self, nums: List[int]) -> int:length = len(nums)if length == 0:return 0dp = [0] * lengthfor i in range(length):cur_max = 0for j in range(i):if nums[i] > nums[j]:cur_max = max(cur_max, dp[j])dp[i] = cur_max + 1return max(dp)
