|| Easy Approach Using Sliding Windows || C++||
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+M)\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```cpp []\nclass Solution {\npublic:\n    long long validSubstringCount(string s, string t){\n        vector<int>a(26,0);\n        vector<int>b(26,0);\n        for(auto x : t){\n            b[x-\'a\']++;\n        }\n        int k=0;\n        long long  count=0;\n        int i=0;\n        bool flag=false;\n        for( i=0; i<s.length(); i++){\n\n            if(flag==false)\n            a[s[i]-\'a\']++;\n             flag = true;\n            for(int i=0; i<26; i++){\n                if(a[i]<b[i]){\n                    flag = false;\n                    break;\n                }\n            }\n            if(flag){\n                count+=s.length()-i;\n                a[s[k]-\'a\']--;\n                k++;\n                i--;\n            }\n            \n        }\n       \n        return count;\n        \n    }\n};\n```
['Sliding Window', 'Prefix Sum', 'C++']