Loading...
Loading...
Loading...
A spelling tool checks a word and wants to know how vowel-heavy it is. Given a lowercase word and a number k, print the largest number of vowels (a, e, i, o, u) in any k letters in a row.
Example
Input
placement 4
Output
2
The block "acem" has 2 vowels, and no block has 3.
Try the problem first. Open one hint at a time.
Turn each letter into 1 for a vowel and 0 for anything else.
Then it is the same as the largest sum of k values.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor