Tap here to switch tabs
Problem
Submissions

Problem: Maximum Vowels in a Substring of Given Length

med
30 min
Try to solve the Maximum Vowels in a Substring of Given Length problem.

Statement

Given a string s and an integer k, return the maximum number of vowel letters in any substring of s of length k.

Note: Vowel letters in English are 'a', 'e', 'i', 'o', and 'u'.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters.

  • 1≤1 \leq k ≤\leq s.length

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Vowels in a Substring of Given Length

med
30 min
Try to solve the Maximum Vowels in a Substring of Given Length problem.

Statement

Given a string s and an integer k, return the maximum number of vowel letters in any substring of s of length k.

Note: Vowel letters in English are 'a', 'e', 'i', 'o', and 'u'.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters.

  • 1≤1 \leq k ≤\leq s.length