Problems > Alternating Caps > Editorial

Alternating Caps — Solution & Editorial

Back to the Problem

Walk the string with its index; transform based on index parity.

Complexity: O(|S|)