Java Solution Beats 100%
\n\n    public int Power(String s) {\n        int i=0;\n        int j =0;\n        int max = 0;\n        while(j < s.length()){\n           if(s.charAt(i) == s.
```\n\n    public int Power(String s) {\n        int i=0;\n        int j =0;\n        int max = 0;\n        while(j < s.length()){\n           if(s.charAt(i) == s.charAt(j)){\n               if(max < (j-i+1)){\n                   max = j-i+1;\n               }\n               j++;\n           } \n            else{\n                i =j;\n            }\n        }\n        \n        return max;\n    }\n\n```
[]