C#
\npublic int LongestPalindrome(string s) {\n\tvar result = s.GroupBy(c => c).Sum(g => g.Count() / 2 * 2);\n\treturn result == s.Length ? result : result + 1;\n}
```\npublic int LongestPalindrome(string s) {\n\tvar result = s.GroupBy(c => c).Sum(g => g.Count() / 2 * 2);\n\treturn result == s.Length ? result : result + 1;\n}\n```
[]