✅C++ 94.89% faster || easy approach using sliding window
\n# Code\n\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        \n        unordered_map<string,int> mp;\n 
\n# Code\n```\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        \n        unordered_map<string,int> mp;\n        for(int k=minSize;k<=minSize;k++){\n            unordered_map<char,int> track;\n            int count = 0;\n            int i=0,j=0;\n\n            while(j<s.length()){\n                track[s[j]]++;\n                if(track[s[j]] == 1){\n                    count++;\n                }\n                \n\n                if((j-i+1)<k){\n                    j++;\n                }else{\n                    if(count <= maxLetters){\n                        mp[s.substr(i,(j-i+1))]++;\n                    }\n                    track[s[i]]--;\n                    if(track[s[i]] == 0)\n                        count--;\n                    i++;j++;\n                }\n            }\n        }\n        int mx = 0;\n        for(auto i:mp){\n            // cout<<i.first<<" "<<i.second<<endl;\n            mx = max(mx,i.second);\n        }\n        return mx;\n    }\n};\n```
['C++']