简单
题目
https://leetcode-cn.com/problems/longest-continuous-increasing-subsequence/
代码
class Solution {
public int findLengthOfLCIS(int[] nums) {
if(nums.length==0){
return 0;
}
if(nums.length==1){
return 1;
}
int max=0;
int count=1;
for(int i=1;i<nums.length;i++){
if(nums[i]>nums[i-1]){
count++;
}
else{
max=Math.max(max,count);
count=1;
}
}
max=Math.max(max,count);
return max;
}
}