C++ || using sliding window;
Intuition\n Describe your first thoughts on how to solve this problem. \nUsing Sliding Window concept;\n\n# Complexity\n- Time complexity: O(N)\n Add your time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nUsing Sliding Window concept;\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfSubstrings(string s) {\n        vector<int>v(3,0);\n        int i=0,j=0,size=s.size();\n        int count=0;\n        while(j<size){\n            v[s[j]-\'a\']++;\n            while(v[0]!=0 && v[1]!=0 && v[2]!=0){\n                v[s[i]-\'a\']--;\n                i++;\n            }\n            j++;\n            count+=i;\n        }\n        return count;\n    }\n};\n```\n\nSome other sliding window problems are 209,862,904,992,1004,1248
['C++']