Daily LeetCoding Challenge [13 December 2021] in C++
\nSolution in c++\n\n\n\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int n = s.size();\n        int ans = 1;\n        int cnt = 1;\n       
\n**Solution in c++**\n\n\n```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        int n = s.size();\n        int ans = 1;\n        int cnt = 1;\n        for(int i = 1; i < n; i++){\n            if(s[i] == s[i-1]){\n                cnt++;\n            }else{\n                cnt = 1;\n            }\n            ans = max(ans, cnt);\n        }\n        return ans;   \n    }\n};\n\n```\n\n**if you understand solution then dont forget to upvote**
['String', 'C']