Problems > camelCase to snake_case > Editorial

camelCase to snake_case — Solution & Editorial

Back to the Problem

Emit _ + lowercase for uppercase characters, everything else verbatim.

Complexity: O(length)