C++ || O(n) || Bit Manipulation
\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        unordered_map<string, int> umap;\n        bitset<26>
```\nclass Solution {\npublic:\n    int maxFreq(string s, int maxLetters, int minSize, int maxSize) {\n        unordered_map<string, int> umap;\n        bitset<26> bit;\n        int ans = 0;\n            for(int j = 0; j <= s.length() - minSize; j++){\n                bit.reset();\n                string str = s.substr(j, minSize);\n                for(char character: str){\n                    bit.set(character - \'a\');\n                }\n                if(bit.count() <= maxLetters){\n                    umap[str]++;\n                    ans = max(ans, umap[str]);\n                }\n            }    \n        return ans;\n    }\n};\n```
['Bit Manipulation', 'C']