Go fast O(n)  4 ms
\nfunc maxPower(s string) int {\n    if len(s) == 0 {return 0}\n    \n    var res int\n    \n    counter, preChar := 1, s[0]\n    \n    for i := 1; i < len(s); 
```\nfunc maxPower(s string) int {\n    if len(s) == 0 {return 0}\n    \n    var res int\n    \n    counter, preChar := 1, s[0]\n    \n    for i := 1; i < len(s); i++ {\n        if s[i] == preChar {\n            counter++\n            \n            if counter > res {res = counter}\n        } else {\n            counter = 1\n            preChar = s[i]\n        }\n    }\n    \n    if counter > res {res = counter}\n    \n    return res\n}\n\n```
['Go']