Given an array of strings, group the anagrams together. Two strings are anagrams if they contain the same letters in any order.
You bin samples by a normalized signature all the time. The trick here is choosing a good canonical key.
Input: ["eat","tea","tan","ate","nat","bat"]
Output: [["eat","tea","ate"],["tan","nat"],["bat"]]
// hit Run to execute the sample tests
// Interactive editor preview. Live code execution arrives with your early-access cohort.