C++ | easy one pass solution
\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int mx=0,x=1;\n        for(int i=0;i<s.length();++i)\n        {\n            if(s[i+1]==s[i])
```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int mx=0,x=1;\n        for(int i=0;i<s.length();++i)\n        {\n            if(s[i+1]==s[i]) x++;\n            else \n            {\n                mx=max(mx,x);\n                x=1;\n            }\n            \n        }\n        return mx;\n    }\n};\n```
['C']