This problem introduces the concept of a sliding window with a budget constraint, where the window validity depends on the count of the most frequent character.
Enable JavaScript for the full StreamPrep guide.