Problems > Rearrange into a Palindrome > Editorial

Rearrange into a Palindrome — Solution & Editorial

Back to the Problem

A palindrome allows at most ONE character with an odd count (the middle). Count odd frequencies.

Complexity: O(|S|)