Remove Vowels from a Given String
Given a string STR
of length N
, your task is to remove all the vowels present in that string and return the modified string.
Explanation:
English alphabets ‘a’, ‘e’, ‘i’, ‘o’, ‘u’ are considered vowels. All other alphabets are consonants. The task is to remove vowels while maintaining the relative position of all other characters.
Input:
The first line of input contains an integer 'T' representing the number of test cases.
Each test case consists of one line containing the string STR
.
Output:
For each test case, return the modified string that contains 'NO VOWELS'.
Example:
Input:
2
CodeGeek
Odinson
Output:
CdGk
dnsn
Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 104
STR
may contain alphabets from 'a' to 'z' or 'A' to 'Z' and blank spaces.- Time Limit: 1 sec
Note:
You do not need to print anything; it has already been taken care of. Just implement the given function.
Be the first one to answer
Add answer anonymously...
Top Flex Associate Software Engineer interview questions & answers
Popular interview questions of Associate Software Engineer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app