📌 c++ solution using sliding window ✔
\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int i=0,j=0,ans=0,ln=s.size();\n        while(j<ln){\n            while(j<ln && s[j]==s[i])j+
```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int i=0,j=0,ans=0,ln=s.size();\n        while(j<ln){\n            while(j<ln && s[j]==s[i])j++;\n            ans= max(ans, j-i);\n            i=j;\n        }\n        return ans;\n    }\n};\n```
['C', 'Sliding Window', 'C++']