C++ super-easy understanding solution (non-sliding window approach)
\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& nums) \n    {\n        if(nums.size() == 0) return 0;\n        vector<int> dp(nums.size(), -1
```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& nums) \n    {\n        if(nums.size() == 0) return 0;\n        vector<int> dp(nums.size(), -1);\n        for(int i=0; i<nums.size(); ++i)\n        {\n            if(dp[i] == -1)\n            {\n                dfs(nums, dp, i);   \n            }\n        }\n        int ret = 0;\n        for(auto& v:dp)\n        {\n            ret = max(ret, v);\n            cout << v <<endl;\n        }\n        return ret;\n    }\n    int dfs(const vector<int>& nums, vector<int>& dp, int i)\n    {\n        if(i==nums.size()-1)\n        {\n            dp[i] = 1;\n            return dp[i];\n        }\n        \n        if(nums[i+1] > nums[i])\n        {\n            if(dp[i+1] == -1)\n            {\n                dp[i] =  max( 1 + dfs(nums, dp, i+1), dp[i]);\n            }\n            else\n            {\n                dp[i] = max(dp[i], 1 + dp[i+1]);\n            }\n        }\n        else\n        {\n            dp[i] = 1;\n        }\n        return dp[i];\n    }\n};\n```
['Dynamic Programming', 'Depth-First Search']