ZUORA Off-Campus OA (2021) | Problem Longest Palindrome
Question · Posted Jun 2026
Problem: Longest Palindrome Given a string s consisting of uppercase and lowercase English letters, return the length of the longest palindrome that can be built using those letters. Note: Uppercase and lowercase letters are considered different characters. Example Input s = "abccccdd" Output 7 Explanation Character frequencies: Character Frequency a 1 b 1 c 4 d 2 Use all 4 'c' Use all 2 'd' Use one of 'a' or 'b' in the center Palindrome length = 4 + 2 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account