[C++] | Shortest answer | O(n)
\nint maxPower(string s) {\n        int i=0,n=s.length()-1,ans=1,c;\n        while(i<n){\n            c=1;\n            while(s[i]==s[i+1])c++,i++; //count how 
```\nint maxPower(string s) {\n        int i=0,n=s.length()-1,ans=1,c;\n        while(i<n){\n            c=1;\n            while(s[i]==s[i+1])c++,i++; //count how many are same\n            ans=max(ans,c); //max check\n            i++;\n        }\n        return ans;\n    }\n```
[]