MAP || AVS
\n# Code\ncpp []\nclass Solution {\npublic:\n    int numberOfSubstrings(string s, int k) {\n        int ans = 0;\n        for (int i = 0; i < s.size(); i++) {\n
\n# Code\n```cpp []\nclass Solution {\npublic:\n    int numberOfSubstrings(string s, int k) {\n        int ans = 0;\n        for (int i = 0; i < s.size(); i++) {\n            map<char, int> m;\n            int check = 0;\n            for (int j = i; j < s.size(); j++) {\n                m[s[j]]++;\n                if (m[s[j]] == k)check++;\n                if (check)ans++;\n            }\n        }\n        return ans;\n    }\n};\n```
['Hash Table', 'C++']