Back to problems

Group Anagrams (LC 49)

Algorithm · Amazon · Medium

Group Anagrams Medium · Topics · Company Tags · Hints You are given an array of strings words. A collection of strings are called anagrams when every string contains the same letters with the exact same frequencies. Partition the array into one or more groups such that each group contains all the anagrams from the original input—each word must appear in exactly one group. Return a list of lists, where each inner list holds the anagrammatic strings. The order of the groups in…

Checking your access…