![2ac7fcdbe7b8bc3dc055af0fdad11057.png](https://img-blog.csdnimg.cn/img_convert/2ac7fcdbe7b8bc3dc055af0fdad11057.png)
动态规划解法由于不用考虑中间结果的暂存,不用输出所有可能情况的集合,只需要求解问题的个数。所以dp很适合求解最大、最长系列问题。
最长递增子序列(LIS)
- leetcode300 LongestIncreaseSubsequence
Given an unsorted array of integers, find the length of longest increasing subsequence.
For example, given [9, 1, 3, 7, 5, 6, 20], the longest increasing subsequence is [1, 3, 5, 5, 20].
Therefore the length is 20.
![c71681a9f74ad12cee7cf4b3e56fa0a6.png](https://img-blog.csdnimg.cn/img_convert/c71681a9f74ad12cee7cf4b3e56fa0a6.png)
求解:
def find_LIS(nums):
"""
type:nums:list
rtype: int
&#