Longest palindrome length
Your task
Given a string of letters (case-sensitive), you may rearrange any subset of them to form a palindrome. Return the length of the longest palindrome you can build. Example: 'abccccdd' gives 7, e.g. 'dccaccd'. A single leftover letter may sit in the middle, but at most one.
Examples
longest_palindrome_length(letters: str) -> intExample 1
Input
longest_palindrome_length("abccccdd")Output
7