← All problems
Group Anagrams (hashmap drill)
Given an array of strings, group anagrams together using hashing rather than pairwise comparison. Design a hashable canonical key for each anagram class.
Complexity
Time O(n*k), Space O(n*k)
Common pitfalls
- Sorted-key O(k log k) overhead
- Mutable keys
Your solution
Log in to save your code and track progress.