easy to learn
Intuition\n Describe your first thoughts on how to solve this problem. \nwe have to count substring having at least one char fre. at leat k\n\n# Approach\n Desc
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nwe have to count substring having at least one char fre. at leat k\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nfind all bossible substring \ncheck occurrence of char \nif we find even a case that is correct then add 1 for every substring \n\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(N*N)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(N)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int numberOfSubstrings(string s, int k) {\n        int n=s.size();\n       long long  int cnt=0;\n        for(int i=0;i<n;i++){\n             vector<int>mark(26,0);\n             bool flag=0;\n            for(int j=i;j<n;j++){\n                mark[s[j]-\'a\']++;\n                if(flag==1) cnt++;\n                else if(mark[s[j]-\'a\']>=k){\n                    cnt++;\n                    flag=1;\n                }\n            }\n        }\n        return cnt;\n        \n    }\n};\n```
['C++']