466. Longest Palindrome You Can Build
EasyCounting
Using the letters of s (case-sensitive), print the length of the longest palindrome you can build.
Input format
One string
Output format
The length.
Example 1
Input
abccccdd
Output
7
Example 2
Input
a
Output
1
Constraints
1 ≤ |s| ≤ 2000
Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.
Loading the MyLoginn IDE…