Search⌘ K
AI Features

Longest Palindrome

Explore how to determine the longest palindrome that can be formed from a given string containing case-sensitive letters in C++. Learn to use hash maps effectively for counting characters and understand time and space tradeoffs to implement an optimal O(n) solution.

Statement

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

...