#C11255. Palindrome Permutation Check
Palindrome Permutation Check
Palindrome Permutation Check
Given a string s
, determine whether any permutation of its characters can form a palindrome.
A string can be rearranged to form a palindrome if and only if at most one character has an odd frequency count. In mathematical notation, if \(\text{odd_count}\) is the number of characters with an odd count, then a palindrome permutation exists if and only if \(\text{odd_count} \leq 1\).
The solution should ignore whitespace and be case-insensitive.
inputFormat
The input consists of a single line containing the string s
.
Note: The string may include spaces and mixed case letters.
outputFormat
Output a single line: True
if any permutation of the string can form a palindrome, otherwise False
.
civic
True