Rearrange into a Palindrome — Solution & Editorial
A palindrome allows at most ONE character with an odd count (the middle). Count odd frequencies.
Complexity: O(|S|)
A palindrome allows at most ONE character with an odd count (the middle). Count odd frequencies.
Complexity: O(|S|)