Skip to content

#1456 - Maximum Number of Vowels in a Substring of Given Length

MediumSliding Window
Open on LeetCode

Given a string s and an integer k, return the maximum number of vowel letters (a, e, i, o, u) in any substring of s with length k.

InputOutput
s = "abciiidef", k = 33
s = "aeiou", k = 22
s = "leetcode", k = 32

Released under the MIT License.