[Python] Sliding Window Solution with Explanation
We will move a sliding window from left to right that contains atleast 1 a,b and c.\n The left pointer will represent number of substrings that can be formed fr
* We will move a sliding window from left to right that contains atleast 1 a,b and c.\n* The left pointer will represent number of substrings that can be formed from 0 index to right.\n* Now, lets see number of substrings for each iteration\n* "**abc**abc"  --> 1\n* "a**bca**bc" --> 2\n* "ab**cab**c" --> 3\n* "abc**abc**" --> 4\n* Resulting in total of 10 substrings\n\n```\nclass Solution:\n    def numberOfSubstrings(self, s: str) -> int:\n        count, left = 0, 0\n        map = {x:0 for x in "abc"}\n        \n        for right in range(0,len(s)):\n            map[s[right]] += 1\n            \n            while map["a"] and map["b"] and map["c"]:\n                map[s[left]] -= 1\n                left += 1\n            \n            count += left\n            \n        return count\n```
['Sliding Window', 'Python', 'Python3']