Simple Sliding Window 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:\nO(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    {\n        int ct = 0;\n        \n        unordered_map<char,int>mp;\n        \n        int i = 0, j = 0;\n        \n        while(j<(int)s.size())\n        {\n            mp[s[j]]++;\n            \n            while(1)\n        {\n                bool ck = false;\n            for(auto ele:mp)\n            {\n                if(ele.second>=k)\n                {\n                    ct += ((int)s.size()-j);\n                    mp[s[i]]--;\n                   // cout<<i<<" "<<j<<"\\n";\n                    i++;\n                    ck = true;\n                    break;\n                }\n            }\n                if(!ck){\n                    break;\n                }\n        \n        }\n            \n            j++;\n            \n        }\n        \n        return ct;\n    }\n};\n```
['Sliding Window', 'C++']