Faster than 85% | Easy sliding window
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```\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        int n = s.size();\n        unordered_map<string,int> mp;\n        for(int sz=minSize;sz<=minSize;sz++){\n            int l = 0, r = 0;\n            unordered_map <char,int> freqMp;\n            int count = 0;\n            while(r<n){\n                freqMp[s[r]]++;\n                if(freqMp[s[r]]==1)\n                    count++;\n                if(r-l+1==sz){\n                    if(count<=maxLetters)\n                        mp[s.substr(l,r-l+1)]++;\n                    freqMp[s[l]]--;\n                    if(freqMp[s[l]]==0)\n                        count--;\n                    l++;\n                }\n                r++;\n            }\n        }\n\n        int ans = 0;\n        for(auto i:mp){\n            ans = max(ans,i.second);\n        }\n        return ans;\n    }\n};\n```
['Sliding Window', 'C++']