class Solution(object): def findLengthOfLCIS(self, nums): """ :type nums: List[int] :rtype: int """ if nums == []: return 0 d_max = 1 d = 1 interval = 32 while (len(nums) - 1) % interval != 0: nums.append(nums[-1]) for i in range(0, len(nums)-interval, interval): for j in range(interval): if nums[i+j] < nums[i+j+1]: d += 1 else: if d_max < d: d_max = d d = 1 return max(d, d_max)