Consecutive Characters | Java | 2 Pointers |O(N)
\nclass Solution {\n    public int maxPower(String s) {\n        int max = 1;\n        int i=0,j=1;\n\t\t\n        for(i=0,j=1; j<s.length(); j++){\n           
```\nclass Solution {\n    public int maxPower(String s) {\n        int max = 1;\n        int i=0,j=1;\n\t\t\n        for(i=0,j=1; j<s.length(); j++){\n            \n            if(s.charAt(i)!=s.charAt(j)){\n                max = Math.max(j-i,max);\n                i=j;\n            }\n        }\n        return Math.max(j-i,max);      \n        \n    }\n}\n```
['Java']