IIBM·DSABand 7Onsite – Coding 1
Group Anagrams
Problem
Group strings that are anagrams of each other.
Example
["eat","tea","tan","ate"] -> [["eat","tea","ate"],["tan"]]
Constraints
- 1 ≤ n ≤ 10^4
Approach
Sorted string or char-count tuple as the hash key.
added 6 days ago