Python solution, we don't need maxSize, do we?
Considering that the minsize always get the largest frequency, we can only check the minSize. Please correct me if I am wrong.\n\nI may just realize that the pr
Considering that the minsize always get the largest frequency, we can only check the minSize. Please correct me if I am wrong.\n\nI may just realize that the problem is confusing. It means the distinct chars rather than unique chars if the solution below is correct.\n\n```\nimport collections\ndef maxFreq(self, s, maxLetters, minSize, maxSize):\n\tcounts = dict()\n\tfor j in range(len(s)-minSize+1):\n\t\tword = s[j:j+minSize]\n\t\tif word in counts:\n\t\t\tcounts[word]+=1\n\t\telse:\n\t\t\tif len(collections.Counter(word))<=maxLetters:\n\t\t\t\tcounts[word]=1\n\treturn max(counts.values()) if len(counts)!=0 else 0\n\t```
[]