Skip to content
Onsite

Palindrome Permutation

EasyP2Coding

Return true if the characters of s can be rearranged into a palindrome, and false otherwise. You may reorder characters freely but not add or remove any.

Example 1

Input
s = "aabb"
Output
true

Example 2

Input
s = "abc"
Output
false

Example 3

Input
s = "a"
Output
true

Constraints

  • 0 <= s.length <= 10^5
  • s consists of lowercase letters.

Hints

Run checks the 3 visible tests, Submit all 12.