Python group the same string by the sorted(string) and store in dictionary

  • 0
    class Solution(object):
        def groupAnagrams(self, strs):
            ans, dic = [], collections.defaultdict(list)
            for s in strs:
            for d in dic:
            return ans

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.