Question
Implement safe structural email validation for a registration form. Return True only if `email` is a single local part, exactly one '@', and a domain with a dot-separated TLD of at least two letters. Specifically it must match: local part of [A-Za-z0-9._%+-]+, then '@', then a domain of [A-Za-z0-9.-]+, then a literal dot, then a TLD of 2+ letters, anchored to the whole string. Reject anything with zero or multiple '@'. Empty string is invalid.
is_valid_email(email: str) → bool["alice@example.com"]outtrueState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.