最长递增子序列

LeetCode 经典 150 一维动态规划
难度: 中等

题目描述

找到数组中最长递增子序列的长度。

解题思路

使用动态规划,递推公式为 dp[i] = max(dp[j] + 1),其中 nums[j] < nums[i]。