C++ 100% faster using iterators
\nclass Solution {\npublic:\n    int maxPower(string s) {\n        s += \' \';\n        auto unique_char = s.begin();\n        uint32_t current_power = 1;\n    
```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        s += \' \';\n        auto unique_char = s.begin();\n        uint32_t current_power = 1;\n        uint32_t max_power = 0;\n        for (auto it = s.begin() + 1; it != s.end(); it++) {\n            if (*it != *unique_char) {\n                *unique_char = *it;\n                if (current_power > max_power) {\n                    max_power = current_power;\n                }\n                current_power = 1;\n            } else {\n                current_power++;\n            }\n        }\n        return max_power;\n    }\n};\n```
['C', 'Iterator']