int findLengthOfLCIS(int* nums, int numsSize){ int i,count=1,max=1; for (i=1; i<numsSize; i++) { if (nums[i] > nums[i-1]) { count++; } else { if (count > max) max = count; count=1; } } if (count > max) max = count; return (numsSize)? max: 0; }