Longest Palindrome
Easy · Hashing · about 10 minutes
Asked at Google, Amazon, Bloomberg, Meta, Microsoft.
s contains uppercase and lowercase letters, and 'a' and 'A' count as different letters. Rearranging any subset of these letters, what is the longest palindrome you can build? Return its length.