Problems > Mask the Email > Editorial

Mask the Email — Solution & Editorial

Back to the Problem

Split at @; rebuild as first + stars + last + @domain, with max(1, len−2) stars.

Complexity: O(length)