Leetcode 49: Group Anagrams

Use a hash map with key being the sorted word and value being a vector of strings of all instances of that anagram. Iterate through input array, filling the hash map. Then iterate through the hash map adding the map values (vectors) to our result vector.

This entry was posted in programming and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *