Simple Java beat 99.67%
\npublic int longestPalindrome(String s) {\n        int[] chars = new int[128];\n        char[] t = s.toCharArray();\n        for(char c:t){\n            chars[
```\npublic int longestPalindrome(String s) {\n        int[] chars = new int[128];\n        char[] t = s.toCharArray();\n        for(char c:t){\n            chars[c]++;\n        }\n        int single = 0;\n        for(int n:chars){\n            if(n%2!=0){\n                single++;\n            }\n        }\n        return single>1?t.length-single+1:t.length;\n    }\n```
[]