Search⌘ K
AI Features

Longest Palindrome

Explore how to determine the length of the longest palindrome that can be built from a given string of case-sensitive letters. Understand the use of hash maps for frequency counting and develop an optimal algorithm that runs in linear time. This lesson helps you grasp palindrome construction logic useful 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: ...