Beginner understandable || 100% T.C || CPP
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int maxPower(string s) {\n        if(s.size()==1) return 1;\n         int i=0,j=1;\n        int maxi=0;\n        int count=1;\n        while(j<s.size() && i<j){\n            if(s[i]==s[j]){\n                while(s[i]==s[j] && j<s.size()){\n                j++;\n                count++;\n                }\n            }\n            else{\n                i=j;\n                j=j+1;\n                count=1;\n            }\n            if(count!=0) maxi=max(maxi,count);\n        }\n        return maxi;\n    }\n};\n```
['C++']