Mirror pair usernames
A community site awards a 'mirror pair' badge when one username is exactly the reverse of another, ignoring letter case. Given two usernames a and b (ASCII letters and digits only), return True if reversing a and comparing case-insensitively gives b, and False otherwise. For example, 'Dev' and 'VED' form a mirror pair, but 'abc' and 'abc' do not.
Implement
is_mirror_pair(a: str, b: str) → boolExamples
in
["Dev","VED"]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 10 min
solution.py
InputExpectedGot
["Dev","VED"]truenot run yetsample