[Python] 2-lines Counter
Intuition\nIf a string have occurrences x times,\nany of its substring must appear at least x times.\n\nThere must be a substring of length minSize, that has th
## **Intuition**\nIf a string have occurrences `x` times,\nany of its substring must appear at least `x` times.\n\nThere must be a substring of length `minSize`, that has the most occurrences.\nSo that we just need to count the occurrences of all substring with length `minSize`.\n<br>\n\n## **Explanation**\nFind the maximum occurrences of all substrings  with length `k = minSize`\n<br>\n\n## **Complexity**\nTime `O(KN)`, where `K = minSize`\nSpace `O(KN)`\n<br>\n\n**Python:**\n```python\n    def maxFreq(self, s, maxLetters, k, maxSize):\n        count = collections.Counter(s[i:i + k] for i in xrange(len(s) - k + 1))\n        return max([count[w] for w in count if len(set(w)) <= maxLetters] + [0])\n```\n
[]