✅✅✅🤫Easy Solution Optimised BruteForce
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 ans=0;\n        for(int i=0;i<n;i++){\n            vector<int> V(26,0);\n            bool flag=false; // if true means all next sequence contains more than k one repeated charter\n            for(int j=i;j<n;j++){\n                if(flag){\n                    ans+=(n-j);\n                    break;\n                }\n                V[s[j]-\'a\']++;\n                for(auto &freq:V){\n                    if(freq>=k){\n                        flag=true;\n                        ans++;\n                    }\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']