Question
Given an array of stringsÂ
strs
, group the anagrams together. You can return the answer in any order.
This is anarrays question.
Idea
- I want to literate through the list of arrays and determine a criteria to bin each word
- I could use a sorted string of the letters in the word as a key and have the value be the sublist
- After iterating through the entire list, O(n) time, I would take the values in the hashmap, and append them to a res list and return that