Longest Substring

4.3

3 votes
Easy, Implementaion
Problem

Given a string  consists of lowercase character. You have to find the maximum length of substring which consists of alternate vowel and consonant.  

Input: 
One single line representing the string .

Output:
One single Integer representing maximum length of the substring.

Constraint:

Where  is the length of the string .

Sample Input
abcdef
Sample Output
3
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Here maximum length substring string with alternate vowel and consonant is "def".

Editor Image

?