Password strength validator
Implement a password strength validator for a sign-up form. Return True only if the password satisfies ALL of: at least 8 characters long, contains at least one uppercase letter, at least one lowercase letter, at least one digit, and at least one special character (any character that is not a letter or digit). Otherwise return False.
Implement
password_strength(pw: str) → boolExamples
in
["Abcdef1!"]outtrueWhat a strong answer looks like
State 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.
0:00 of about 12 min
solution.py
InputExpectedGot
["Abcdef1!"]truenot run yetsample