Back to the Problem
Split at @; rebuild as first + stars + last + @domain, with max(1, len−2) stars.
Complexity: O(length)