#3305
Count of Substrings Containing Every Vowel and K Consonants I
medium · 41.7% accepted · 142 likes · top 22%
hash table · string · sliding window
Description
You are given a string word and a non-negative integer k.
Return the total number of substrings of word that contain every vowel ('a', 'e', 'i', 'o', and 'u') at least once and exactly k consonants.
Solution