ShardUp
About
Members
Events
Contests
HireUp
Practice
Join
Longest Palindrome
Easy
String
Hash Table
Greedy
Palindrome
Google
Amazon
Back to problems
Description
Submissions
Given a case-sensitive string, print the length of the longest palindrome that can be built using its characters. Input format: - One line: s
Constraints
1 <= s.length <= 2 * 10^5
Sample tests
Sample 1
Input
abccccdd
Output
7
Sample 2
Input
a
Output
1
No submissions yet.
Sign in to submit
:)