Longest Substring

4.3

3 votes
Easy, Implementaion
Problem

Given a string S 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 S.

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

Constraint:
1|S|106

Where |S| is the length of the string S.

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

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

Editor Image

?