Problems > Rearrange into a Palindrome

Rearrange into a Palindrome

Difficulty: 1100 3000 ms 128 MB

strings

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

Read the Editorial

Discussion (opens after you solve — no spoilers before)

No comments yet.

Submit Your Solution

Log in or create a free account to run and submit code.