leetcode-674-OK

address

int findLengthOfLCIS(int* nums, int numsSize){
	if(numsSize == 0)
		return 0;
	int pstart = 1,answer = 1;
	for(int i =0; i<numsSize-1; i++){
		if(nums[i]<nums[i+1])
			pstart++;
		else{
			if(pstart>answer)
				answer = pstart;
			pstart = 1;
		}
	}
	if(pstart>answer)
		answer = pstart;
	return answer;
}
posted @ 2021-01-24 00:55  RougeBW  阅读(28)  评论(0编辑  收藏  举报