#C11261. Palindromic Permutation
Palindromic Permutation
Palindromic Permutation
Given a string ( s ), determine if its characters can be rearranged to form a palindrome. A palindrome is a string that reads the same forwards and backwards.
A necessary and sufficient condition for a rearrangement to form a palindrome is that at most one character appears an odd number of times. For example, for the input "aabbc", it is possible to rearrange the characters to form "abcba", so the answer is "Yes".
inputFormat
The first line of input contains an integer ( T ) representing the number of test cases. This is followed by ( T ) lines, each containing a single string ( s ) composed only of lowercase English letters.
outputFormat
For each test case, output "Yes" if the characters can be rearranged to form a palindrome, otherwise output "No". Each output should be printed on a new line.## sample
3
aabbcc
aabbc
abc
Yes
Yes
No
</p>