Problem 3306 · Medium

Count of Substrings Containing Every Vowel and K Consonants II

Count substrings with at least k consonants and subtract those with at least k+1, using one sliding window for each count.

Open the interactive visualisation