Python data engineering interview problem. Difficulty: intermediate. Pattern: Hashing. About 15 minutes. Part of the Pro drill bank.
Warehouse SKUs are sometimes anagrams of each other (same letters, different order) because of a packing glitch. Group SKUs that share a letter signature.
Group product SKUs that are anagrams of one another.
Input: group_anagram_skus(['eat', 'tea', 'tan']) Output: [['eat', 'tea'], ['tan']] This input follows the stated rules and produces this output.
Topics: lakebench, python, hash-based-problems.
More Python interview questions · All interview problems · Learn data engineering
Interview-style drill: Group SKU codes that are letter-for-letter anagrams of each other.
Group product SKUs that are anagrams of one another.