Easy Solution. Beats 94%.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n- O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& nums) {\n        int count=0;\n        int ans=0;\n        for(int i=1;i<nums.size();i++){\n            if(nums[i]>nums[i-1]){\n                count++;\n            }\n            else{\n                //max between count and ans\n                ans=max(count,ans);\n                count=0;\n            }\n        }\n        ans=max(count,ans);\n        \n        //we have traversed from 1 index so we have to add 1 to the ans.\n        return ans+1;\n    }\n};\n```
['C++']