C++ solution | 87.72% time, 94.70% space | update max length on the fly
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& nums);\n};\n/*********************************************************/\nint Solution::findLengthOfLCIS(vector<int>& nums) {\n    int maxLength=1, length=1, i, size = nums.size();\n    for (i = 1; i < size; ++i) {\n        if (nums[i-1] < nums[i]) {\n            ++length;\n            if (length > maxLength) {\n                maxLength = length;\n            }\n        } else {\n            length = 1;\n        }\n    }\n    return maxLength;\n}\n/*********************************************************/\n```
['C++']