[C++/Java] Clean Code - 3 liner [2 Pointers]
C++ record length\n\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& a) {\n        int mx = 0, len = 0;\n        for (int i = 0; i < a.size(); 
**C++ record length**\n```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& a) {\n        int mx = 0, len = 0;\n        for (int i = 0; i < a.size(); i++) {\n            if (i == 0 || a[i] <= a[i - 1]) len = 0;\n            mx = max(mx, ++len);\n        }\n        return mx;\n    }\n};\n```\n**C++ 2 pointer**\n```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& a) {\n        int mx = 0;\n        for (int i = 0, j = 0; j < a.size(); j++) {\n            if (j == 0 || a[j] <= a[j - 1]) i = j;\n            mx = max(mx, j - (i - 1))\n        }\n        return mx;\n    }\n};\n```\n3 liner\n```\nclass Solution {\npublic:\n    int findLengthOfLCIS(vector<int>& a) {\n        int mx = 0;\n        for (int i = 0, j = 0; j < a.size(); i = (j == 0 || a[j] <= a[j - 1]) ? j : i, mx = max(mx, j - (i - 1)), j++) { }\n        return mx;\n    }\n};\n```\n**Java - 2 pointer**\n```\nclass Solution {\n    public int findLengthOfLCIS(int[] a) {\n        int mx = 0;\n        for (int i = 0, j = 0; j < a.length; i = (j == 0 || a[j] <= a[j - 1]) ? j : i, mx = Math.max(mx, j - i + 1), j++) { }\n        return mx;\n    }\n}\n```\n\n**Java length variable**\n```\nclass Solution {\n    public int findLengthOfLCIS(int[] a) {\n        int mx = 0, len = 0;\n        for (int i = 0; i < a.length; i++) {\n            if (i == 0 || a[i] <= a[i - 1]) len = 0;\n            mx = Math.max(mx, ++len);\n        }\n        return mx;\n    }\n}\n```
[]