CPP CODE
Code\n\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        unordered_map<string , int> freq;\n        int
# Code\n```\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        unordered_map<string , int> freq;\n        int maxf = 0;\n        for(int i=0;i<=s.size()-minSize;i++){\n            string sub = s.substr(i,minSize);\n            unordered_set<char> uchar(sub.begin() , sub.end());\n\n            if(uchar.size() <= maxLetters){\n                freq[sub]++;\n                maxf = max(maxf , freq[sub]);\n            }\n        }\n        return maxf;\n    }\n};\n```
['C++']