JAVA | consecutive-characters
\nclass Solution {\n    public int maxPower(String s) {\n        int res=1,c=1;\n        for(int i=0;i<s.length()-1;i++)\n        {\n            if(s.charAt(i)=
```\nclass Solution {\n    public int maxPower(String s) {\n        int res=1,c=1;\n        for(int i=0;i<s.length()-1;i++)\n        {\n            if(s.charAt(i)==s.charAt(i+1))c++;\n            else {\n                res=Math.max(res,c);\n                c=1;\n            }\n        }res=Math.max(res,c);\n        return res;\n    }\n}\n```
['Java']