144: Group anagrams

Given an array of strings, group all anagrams together

 

Example 1

Input:   ["aba", "cdd", "baa"]

Output:  [["aba", "baa"], ["cdd"]]

Example 2

Input:   ["a", "b", "c"]

Output:  [["a"], ["b"], ["c"]]
Difficulty:Medium
Topic:HashSetString
Problem #:144