c++ go through each chunk at a time O(n)
\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int n=s.length(),res=0;\n        for(int i=0;i<n;){\n            int curr=0,start=s[i];\n    
```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int n=s.length(),res=0;\n        for(int i=0;i<n;){\n            int curr=0,start=s[i];\n            while(i<n&&s[i]==start){\n                i++;\n                curr++;\n            }\n            res=max(res,curr);\n        }\n        return res;\n    }\n};\n```
[]