Simple 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:\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 n = s.length();\n        int res = n*(n+1)/2;\n        unordered_map<char, int> count;\n        for(int i = 0,j = 0;j<n;j++){\n            count[s[j]]++;\n            while(count[s[j]] >= k){\n                --count[s[i++]];\n            }\n            res -= (j-i+1);\n        }\n        return res;\n    }\n};\n```
['Hash Table', 'Sliding Window', 'C++']