#K74817. Palindrome Permutation Checker
Palindrome Permutation Checker
Palindrome Permutation Checker
Given a string s
, determine whether it is a permutation of a palindrome. A string is a permutation of a palindrome if at most one character appears an odd number of times when spaces are ignored and character case is not considered.
This condition can be formally written as: $$\text{odd_count} \le 1$$, where \(odd_count\) is the number of characters with an odd frequency.
For example, the input "Tact Coa" can be rearranged to form "taco cat", which is a palindrome.
inputFormat
The input is provided via stdin
as a single line containing the string s
. The string may include spaces and mixed case letters.
outputFormat
Output to stdout
the string True
if the input string is a permutation of a palindrome, and False
otherwise.
civic
True