Problem
Determine whether two strings are anagrams of each other (same characters with the same frequencies). Then, given a list of strings, group all anagrams together.
Input / Output
s and t; for part two, an array of strings.Constraints
1 <= |s| <= 10^5Example
"listen", "silent" -> true; "rat", "car" -> false["eat","tea","tan","ate","nat","bat"] -> [["eat","tea","ate"],["tan","nat"],["bat"]]