Python data engineering interview problem. Difficulty: beginner. Pattern: Hashing. About 10 minutes. Free to practice.
Check whether two strings are anagrams of each other. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.
Implement valid_anagram(s: str, t: str) -> bool.
Input: valid_anagram('anagram', 'nagaram') Output: True Same letters rearranged.
Topics: lakebench, python, anagram, counting.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Check whether two strings are anagrams of each other.
Implement `valid_anagram(s: str, t: str) -> bool`. Example: `"anagram", "nagaram"` → `True`. Keep the harness.