Simple Brute Force || Substring ✅
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```java []\nclass Solution {\n    public int numberOfSubstrings(String s, int k) {\n        int n = s.length(); \n        int ans=0;\n        for(int i=0;i<n;i++){\n            Map<Character,Integer> map = new HashMap();\n            int max=0;\n            for(int j=i;j<n;j++){\n                char ch = s.charAt(j);\n                map.put(ch,map.getOrDefault(ch,0)+1);\n                if(map.get(ch)>max) max = map.get(ch);\n                if(max>=k) ans++;\n            }\n        }\n        return ans;\n    }\n}\n```
['String', 'C++', 'Java']