#C14670. Rearrange to Palindrome
Rearrange to Palindrome
Rearrange to Palindrome
Given a string, determine whether its alphanumeric characters can be rearranged to form a palindrome. Consider only alphanumeric characters and ignore case. Mathematically, a sequence can form a palindrome if and only if at most one character occurs an odd number of times. The task is to verify this condition.
Input is provided via stdin and output must be printed to stdout.
\(\textbf{Note:}\) Let the frequency of each character in the processed string be \(f_i\). A palindrome permutation exists if \(\sum_{i}(f_i \bmod 2) \leq 1\).
inputFormat
A single line containing the string which may include letters, digits, spaces, and special characters.
outputFormat
Print 'True' if the provided string can be rearranged to form a palindrome; otherwise, print 'False'.## sample
abba
True