JS || Solution by Bharadwaj
Code\n\nvar maxFreq = function (s, maxUniqLettersCount, minSize, maxSize) {\n    let n = s.length;\n    const freqMap = new Map();\n    let subsMaxFreq = 0;\n  
# Code\n```\nvar maxFreq = function (s, maxUniqLettersCount, minSize, maxSize) {\n    let n = s.length;\n    const freqMap = new Map();\n    let subsMaxFreq = 0;\n    for (let i = 0; i < n; i++) {\n        for (let size = minSize; size <= maxSize; size++) {\n            if (i + size <= n) {\n                const str = s.slice(i, i + size);\n                if (new Set(str).size <= maxUniqLettersCount) {\n                    freqMap.set(str, !freqMap.has(str) ? 1 : freqMap.get(str) + 1);\n                    subsMaxFreq = Math.max(subsMaxFreq, freqMap.get(str));\n                    break\n                }\n            }\n        }\n    }\n    return subsMaxFreq;\n};\n```
['JavaScript']