Python solution using sliding window
\tdef numberOfSubstrings(self, s: str) -> int:\n        res = i = 0\n        hashmap = {x:0 for x in "abc"}\n        \n        for j in range(0,len(s)):\n      
\tdef numberOfSubstrings(self, s: str) -> int:\n        res = i = 0\n        hashmap = {x:0 for x in "abc"}\n        \n        for j in range(0,len(s)):\n            hashmap[s[j]] += 1\n            \n            while all(hashmap.values()):\n                hashmap[s[i]] -= 1\n                i += 1\n            \n            res += i\n            \n        return res\n\n
['Sliding Window', 'Python']