Python
\nclass Solution(object):\n    def findLengthOfLCIS(self, nums):\n        if not nums:\n            return 0\n        ans, pre = 1, 1\n        for i in range(1,
```\nclass Solution(object):\n    def findLengthOfLCIS(self, nums):\n        if not nums:\n            return 0\n        ans, pre = 1, 1\n        for i in range(1, len(nums)):\n            if nums[i] > nums[i - 1]:\n                ans = max(ans, i - pre)\n            else:\n                pre = 1\n            ans = max(ans, pre)\n        return ans\n```
[]