:type strs: List[str] :rtype: List[List[str]]
(self, strs)
| 29 | """ |
| 30 | class Solution(object): |
| 31 | def groupAnagrams(self, strs): |
| 32 | """ |
| 33 | :type strs: List[str] |
| 34 | :rtype: List[List[str]] |
| 35 | """ |
| 36 | result = {} |
| 37 | |
| 38 | for i in strs: |
| 39 | key = ''.join(sorted(i)) |
| 40 | |
| 41 | try: |
| 42 | result[key].append(i) |
| 43 | except: |
| 44 | result[key] = [i] |
| 45 | |
| 46 | return result.values() |
| 47 |
nothing calls this directly
no outgoing calls
no test coverage detected