Longest Palindrome from Letters Problem
Longest Palindrome from Letters Problem — ExecCode School DSA Practice
Solve the Longest Palindrome from Letters problem on ExecCode. Free online school DSA practice in String. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given the input needed to solve Longest Palindrome from Letters. Your task is to understand the rule and print the correct answer. You are working on Longest Palindrome from Letters. Compute the length of the longest palindrome that can be built using the characters present in a given string.
Examples
Input abccccdd; Output 7. Input a; Output 1
Constraints
1 <= n <= 10^5
Practice Longest Palindrome from Letters free on ExecCode. Browse DSA problems, topic map, and placement guides.