#K13006. Palindrome Permutation
Palindrome Permutation
Palindrome Permutation
Given a string, determine whether any permutation of the string can form a palindrome. A permutation of a string is an arrangement of its characters. A string can be rearranged into a palindrome if and only if the count of characters that appear an odd number of times is at most one. In mathematical terms, let ( f(c) ) be the frequency of character ( c ) in the filtered string (only alphabetical characters, case-insensitive). The condition to form a palindrome is: ( #{c : f(c) % 2 \neq 0} \leq 1 ).
Note: All non-alphabetical characters should be ignored and the comparison should be case-insensitive.
inputFormat
Input is provided from standard input (stdin) as a single line containing the string. The string may include spaces, punctuation, or other non-alphabetical characters which should be ignored in the processing.
outputFormat
Output to standard output (stdout) a single line containing either 'True' or 'False' (without quotes). 'True' indicates that some permutation of the input string can form a palindrome, and 'False' otherwise.## sample
Tact Coa
True