0% found this document useful (0 votes)
4 views2 pages

Online For B Section

The document outlines a programming problem for CSE 110 involving finding the longest substring of a given string where the count of each vowel (a, e, i, o, u) is even. It specifies the input format, output format, and rules for the task, including the use of certain string functions. Sample inputs and outputs are provided to illustrate the requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Online For B Section

The document outlines a programming problem for CSE 110 involving finding the longest substring of a given string where the count of each vowel (a, e, i, o, u) is even. It specifies the input format, output format, and rules for the task, including the use of certain string functions. Sample inputs and outputs are provided to illustrate the requirements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

January 2025 CSE 110

Online on Strings

Subsection: B1/B2 ​

Time: 45 minutes + 5 minutes(submission)

Problem Statement:

You are given a string s consisting of only lowercase English letters.

Your task is to:

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).​

2.​ Print the length of that longest substring.

Rules:​

●​ If no valid substring exists (i.e., no substring satisfies the


even-vowel condition), print 0.

You can only use the strlen, strcmp, strcat and strcpy functions from the
string.h library.

Input Format:

●​ A single string s; 1 ≤ |s| ≤ 1000


Output Format:
●​ The length of the longest valid substring.

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

Explanation: No substring exists where the count of each vowel is even.

You might also like