Sliding window || C++ 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:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int numberOfSubstrings(string s, int k) {\n        int cnt = 0; int left = 0;\n        unordered_map<char,int>mp;\n        for (int right = 0; right < s.size(); right++) {\n            mp[s[right]]++;\n            while (mp[s[right]]>=k){\n                mp[s[left]]--;\n                cnt+=s.size()-right; //Number of substrings starting from left index.\n                left++;\n            }\n        }\n        return cnt;\n    }\n};\n```
['C++']