395 Longest Substring with At Least K Repeating Characters
1. Question
Input: s = "aaabb", k = 3
Output: 3
The longest substring is "aaa", as 'a' is repeated 3 times.Input: s = "ababbc", k = 2
Output: 5
The longest substring is "ababb", as 'a' is repeated 2 times and 'b' is repeated 3 times.2. Implementation
3. Time & Space Complexity
Last updated