C++ solution using Sliding Window
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(26)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfSubstrings(string s) {\n        int i=0,j=0,n=s.length(),ans=0;\nunordered_map<char,int> mp;\n        while(i<n){\n            mp[s[i]]++;\n\n            while(mp[\'a\']>0 && mp[\'b\']>0 && mp[\'c\']>0){\n                ans+=(n-i);\n                mp[s[j]]--;\n                j++;\n            }\n            i++;\n        }\n\n        return ans;\n    }\n};\n```
['C++']