Tap here to switch tabs
Problem
Submissions

Problem: Count Substrings With Every Vowel and K Consonants I

med
30 min
Try to solve the Count Substrings With Every Vowel and K Consonants I problem.

Statement

Given a string word and a non-negative integer k, return the total count of substrings of word that contain every vowel (′a′'a', ′e′'e', ′i′'i', ′o′'o', and ′u′'u') at least once and contain exactly k consonants.

Constraints:

  • 5≤5 \leq word.length ≤250\leq 250

  • word consists only of lowercase English letters.

  • 0≤0 \leq k ≤\leq word.length −5- 5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Substrings With Every Vowel and K Consonants I

med
30 min
Try to solve the Count Substrings With Every Vowel and K Consonants I problem.

Statement

Given a string word and a non-negative integer k, return the total count of substrings of word that contain every vowel (′a′'a', ′e′'e', ′i′'i', ′o′'o', and ′u′'u') at least once and contain exactly k consonants.

Constraints:

  • 5≤5 \leq word.length ≤250\leq 250

  • word consists only of lowercase English letters.

  • 0≤0 \leq k ≤\leq word.length −5- 5