O(n) time and O(1) space C++ Solution
\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& nums) {\n        int result=0;\n        int curr = nums[0];\n        int count=1;\n        if
```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& nums) {\n        int result=0;\n        int curr = nums[0];\n        int count=1;\n        if(nums.size()==1)\n            return 1;\n        if(nums.size()==0)\n            return 0;\n        for(int i=1; i<nums.size(); i++){\n            if(nums[i]>curr)\n                count+=1;\n            else\n                count=1;\n            result = max(count,result);\n            curr = nums[i];\n        }\n        return result;\n    }\n};\n```
[]