Question: Given a string of lowercase English letters and an integer of the substring length, determine the substring of that length that contains the most vowels.

Given a string of lowercase English letters and an integer of the substring length, determine the substring of that length that contains the most vowels. Vowels are in the set {a,e,i,o,u}. If there is more than one substring with the maximum number of vowels, return the one that starts at the lowest index. If there are no vowels in the input string, return the string ' Not found!' without quotes.
Example 1
s= 'caberqiitefg'
k=5
The substring of length k=5 that contains the maximum number of vowels is 'erqii' with 3 vowels. The final answer is 'erqii'.
Example 2
s= 'aeiouia'
k=3
 Given a string of lowercase English letters and an integer of

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!