Given an array of strings, group anagrams together.
Sample Input:
["eat","tea","tan","ate","nat","bat"]
Sample Output:
[["eat","tea","ate"],["tan","nat"],["bat"]]
Hints
Hint 1
Anagrams have the same character counts when sorted
Hint 2
Use a hash map with sorted string as the key
Hint 3
Collect all strings with the same sorted pattern