#K52727. Palindrome Permutation Checker
Palindrome Permutation Checker
Palindrome Permutation Checker
Given a string s
, determine whether the characters in the string can be rearranged to form a palindrome. A string is a permutation of a palindrome if, after ignoring spaces and case, at most one character appears an odd number of times. Mathematically, if we denote the number of characters that appear an odd number of times by \(odd\_count\), then the condition is:
\(odd\_count \leq 1\)
For example, the string "Tact Coa" can be rearranged to form "taco cat", which is a palindrome.
inputFormat
The input consists of a single line which contains the string s
to evaluate.
outputFormat
Output a single line: True
if the string can be rearranged to form a palindrome, otherwise False
.
a
True
</p>