Online For B Section
Online For B Section
Online on Strings
Subsection: B1/B2
Problem Statement:
1. Find the longest substring where the count of each vowel (a, e, i, o,
u) is even — including vowels that do not appear at all (0 is
considered even).
Rules:
You can only use the strlen, strcmp, strcat and strcpy functions from the
string.h library.
Input Format:
Sample Input 1
abcdee
Sample Output 1
Explanation
"bcdee" is the longest valid substring with an even number of vowels — 'e'
appears twice and all other vowels appear zero times — so, length of the
substring is 5.
Sample Input 2
aeiouaeiou
Sample Output 2
10
Sample Input 3
ae
Sample Output 3