Solution: Longest Palindrome

Let’s solve the Longest Palindrome problem using the Hash Map pattern.

Statement

Given a string s that contains only letters, return the length of the longest palindrome that may be composed using those letters.

Note: Letters are case-sensitive. For example, “Aa” is not considered a palindrome here.

Constraints:

  • 11 \leq s.length 2000\leq 2000 ...