c#
```\npublic class Solution {\n    public IList> GroupAnagrams(string[] strs) {\n        if (strs == null || strs.Length == 0)\n            return new List>();\n
```\npublic class Solution {\n    public IList<IList<string>> GroupAnagrams(string[] strs) {\n        if (strs == null || strs.Length == 0)\n            return new List<IList<string>>();\n        \n        List<IList<string>> res = new List<IList<string>>();\n        Dictionary<string, List<string>> dict = new Dictionary<string, List<string>>();\n        \n        foreach (var str in strs)\n        {\n            string cur = new string(str.OrderBy(x => x).ToArray());\n            \n            if (!dict.ContainsKey(cur))\n                dict.Add(cur, new List<string>());\n            \n            dict[cur].Add(str);\n        }\n        \n        foreach (var item in dict.Values)\n            res.Add(item);\n        \n        return res;\n    }\n}
[]