Search⌘ K
AI Features

Longest Palindrome

Explore how to determine the longest palindrome length that can be formed from a string of case-sensitive letters using hash maps. Understand the problem constraints and develop a linear time solution that leverages data structures to optimize for coding interviews.

Statement

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

Note: Letters are case-sensitive. Hence, combinations such as “Aa” are not considered palindromes.

Constraints:

  • ...