1297. Maximum Number of Occurrences of a Substring
Description
**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:** 3ac
Previous1296. Divide Array in Sets of K Consecutive NumbersNext1298. Maximum Candies You Can Get from Boxes
Last updated