1297. Maximum Number of Occurrences of a Substring
Input: s = "aababcaab", maxLetters = 2, minSize = 3, maxSize = 4
Output: 2
Explanation: Substring "aab" has 2 ocurrences in the original string.
It satisfies the conditions, 2 unique letters and size 3 (between minSize and maxSize).Input: s = "aaaa", maxLetters = 1, minSize = 3, maxSize = 3
Output: 2
Explanation: Substring "aaa" occur 2 times in the string. It can overlap.Input: s = "aabcabcab", maxLetters = 2, minSize = 2, maxSize = 3
Output: 3Input: s = "abcde", maxLetters = 2, minSize = 3, maxSize = 3
Output: 0Last updated