Max Vowels in Window
Given a string s and an integer k, find the maximum number of vowels that appear together in any contiguous substring of length exactly k.
The vowels are a, e, i, o, u. The string contains only lowercase English letters.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 60" width="400" height="60"> <rect width="400" height="60" fill="#f8f9fa" rx="4"/> <text x="10" y="38" font-family="monospace" font-size="20" fill="#333">a b c</text> <text x="78" y="38" font-family="monospace" font-size="20" fill="#e63946" font-weight="bold">i i i</text> <text x="150" y="38" font-family="monospace" font-size="20" fill="#333">d e f</text> <text x="10" y="55" font-family="monospace" font-size="11" fill="#888">s = "abciiidef", k = 3</text> </svg>Examples
Input: ["abciiidef",3]
Output: 3
Input: ["aeiou",2]
Output: 2
Hints
<details>
<summary>Hint 1</summary>
Focus on how consecutive windows overlap. What information can you carry forward from one window to the next instead of recomputing?
Max Vowels in Window
Given a string `s` and an integer `k`, find the **maximum** number of vowels that appear together in any contiguous substring of length exactly `k`.