In Meta Messenger, you are given a list of lowercase strings and need to group together strings that are anagrams of each other. Two strings are anagrams if they contain the same characters with the same frequencies, possibly in a different order.
Write a function that returns a list of groups, where each group contains strings from the input that are anagrams of one another. The order of groups does not matter, and the order of strings within each group does not matter.
strs, a list of stringsExample 1
strs = ["eat", "tea", "tan", "ate", "nat", "bat"][["eat", "tea", "ate"], ["tan", "nat"], ["bat"]]Example 2
strs = [""][[""]]1 <= len(strs) <= 10^40 <= len(strs[i]) <= 100strs[i] contains only lowercase English letters