Simple Solution with Explanation || TC: O (N*(length of largest word)) || SC: O(N)
We have to just count the occurrence of each word and store it in a map of array having same frequency pattern.\n* Lastly return all the values of hashmap\n\ncl
* We have to just count the occurrence of each word and store it in a map of array having same frequency pattern.\n* Lastly return all the values of hashmap\n```\nclass Solution:\n    def groupAnagrams(self, strs: List[str]) -> List[List[str]]:\n        dct=defaultdict(list)\n        for i in range(len(strs)):\n            st=[0 for _ in range(26)]\n            for j in strs[i]:\n                xi=ord(j)-97\n                st[xi]+=1\n            st=tuple(st)\n            dct[st].append(strs[i])\n        return dct.values()\n```
['Array', 'Python', 'Python3']