Problems > Swap the Case > Editorial

Swap the Case — Solution & Editorial

Back to the Problem

Check each character's case and flip it (the two cases differ by 32 in ASCII).

Complexity: O(|S|)