49_Group Anagrams
Question
Given an array of strings, group anagrams together.
Example:
Given: ["eat", "tea", "tan", "ate", "nat", "bat"],
Return:
[
["ate", "eat","tea"],
["nat","tan"],
["bat"]
]
Note: All inputs will be in lower-case.Idea
Complexity 1 (with sort)
Complexity 2 (without sort, use count table)
Solution 1 (with sort)
Solution 2 (without sort, use count table)
Last updated

