HashMap Solution
Soch\nFollowing up for yesterday\'s POTD, store all subsets with there subset and count and just add them\n\n# Code\npython3 []\nclass Solution:\n    def sumPre
# Soch\nFollowing up for yesterday\'s POTD, store all subsets with there subset and count and just add them\n\n# Code\n```python3 []\nclass Solution:\n    def sumPrefixScores(self, words: List[str]) -> List[int]:\n        k=defaultdict(int)\n        ans=[]\n        for i in words:\n            for j in range(len(i)):\n                k[i[0:j+1]]+=1\n        #print(k)\n        for i in words:\n            temp=0\n            for j in range(len(i)):\n                temp+=k[i[0:j+1]]\n            ans.append(temp)\n        return ans\n        \n```
['Python3']