C++ super easy, short and simple One-Pass solution
\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int max_len = 0, curr_len = 0;\n        char prev = s[0];\n        \n        for(auto letter:
```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int max_len = 0, curr_len = 0;\n        char prev = s[0];\n        \n        for(auto letter:s){\n            if (letter == prev)\n                curr_len++;\n            else\n                curr_len = 1;\n            \n            max_len = max(max_len, curr_len);\n            prev = letter;\n        }\n        \n        return max_len;\n    }\n};\n```\n**Like it? please upvote...**
['C']