Another "aeiou" Problem
Practice
2 (1 votes)
Easy
Problem
78% Success 786 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You are given a String S, find the number of characters that have vowels on both the sides.
INPUT FORMAT
- First line: An integer T denoting the number of test cases
- Each of the next T lines: String S
OUTPUT FORMAT
For each test case, print the number of characters that have a vowel on both sides. Answer of each test case should come in a new line.
CONSTRAINTS
1 <= T <=10
1 <= |S| <=10^5
Sample Input
2 aa aeiou
Sample Output
0 3
Explanation
For the second case,
'a' has only 'e', 'i', 'o', 'u' on right
'e' has 'a' on left and 'i', 'o', 'u' on right.
similarly 'i' and 'o' also have vowels on both side.
Code Editor
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Submissions
Please login to view your submissions
Similar Problems
Points:20
Tags:
Easy
Points:30
19 votes
Tags:
Easy
Points:50
18 votes
Tags:
AlgorithmsDynamic ProgrammingOpenApprovedHard
Editorial
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor