Longest Palindrome
Try to solve the Longest Palindrome problem.
We'll cover the following
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:
s.length
s
consists of lowercase and/or uppercase English letters only.
Examples
Create a free account to view this lesson.
Continue your learning journey with a 14-day free trial.
By signing up, you agree to Educative's Terms of Service and Privacy Policy