首页 > TAG信息列表 > LeetCode673

LeetCode673 最长递增子序列的个数

LeetCode673 最长递增子序列的个数 贪心 + 前缀和 + 二分查找 \(q[i][]\) 数组表示所有能成为长度为 \(i\) 的最长上升子序列的末尾元素的值 \(cnt[i][j]\) 记录以 \(q[i][j]\) 为结尾的最长上升子序列的个数 参考 class Solution: def findNumberOfLIS(self, nums: List[int]