一、题目
给定一个未经排序的整数数组,找到最长且 连续递增的子序列,并返回该序列的长度。
连续递增的子序列 可以由两个下标 l 和 r(l < r)确定,如果对于每个 l <= i < r,都有 nums[i] < nums[i + 1] ,那么子序列 [nums[l], nums[l + 1], …, nums[r - 1], nums[r]] 就是连续递增子序列。
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/431654a54175810309907f414a3f263d.png)
二、贪心代码
只要遇到 nums[i + 1] > nums[i]
的情况,curRes 就加一
class Solution {
public int findLengthOfLCIS(int[