Problems > Valid Username > Editorial

Valid Username — Solution & Editorial

Back to the Problem

Length check, first-character check, then per-character class check.

Complexity: O(|S|)