Group the words from a given list that are anagrams of each other, e.g. ["mat","tam","cute","beat","eatb","teab","ateb"] -> [["mat","tam"],["cute"],["beat","eatb","teab","ateb"]]
Asked in the Technical Round 1 stage.
Implement group_anagrams(words). The input is a list of lowercase strings. Return a list of groups, where each group contains words with identical character counts. Preserve the order of groups by each group's first appearance and preserve word order within each group.
def group_anagrams(words):
words, a list of lowercase strings.def group_anagrams(words):