Rearrange into a Palindrome
Can the characters of S be rearranged into a palindrome?
Input: one line with a lowercase string.
Output: YES or NO.
Constraints:
- 1 ≤ |S| ≤ 105
Sample Tests
Input 1
carrace
Output 1
YES
Input 2
code
Output 2
NO
Discussion (opens after you solve — no spoilers before)
No comments yet.