C++ Sliding Window Solution
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```cpp []\nclass Solution {\npublic:\n    int f(vector<int>&v,int k){\n        int c=0;\n        for(int i=0;i<26;i++){\n            if(v[i]>=k)c++;\n        }\n        return c>=1;\n    }\n\n    int numberOfSubstrings(string s, int k) {\n        vector<int>v(26);\n        int ans=0;\n        int j=0;\n        int n=s.size();\n        for(int i=0;i<s.size();i++){\n            v[s[i]-\'a\']++;\n            while(j<=i && f(v,k)){\n                ans+=(n-i);\n                v[s[j]-\'a\']--;\n                j++;\n            }\n        }\n        return ans;\n    }\n};\n```
['Sliding Window', 'C++']