Asked inPracto,

Remove Vowels from String

Your task is to remove all the vowels from a given string STR of length N and return the modified string.

Explanation:

English alphabets 'a', 'e', 'i', 'o', 'u' are termed as vowels. All other alphabets are called consonants. You have to remove these vowels from the string. There will be no change in the relative position of all other alphabets.

Input:

T - number of test cases followed by T lines each containing a string STR of length N. 

Output:

For each test case, return the modified string that contains 'NO VOWELS'. 

Example:

Input:
CodeGeek
Output:
CdGk
Explanation:

In the string 'CodeGeek', the vowels 'o' and 'e' are removed resulting in 'CdGk'.

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
Be the first one to answer
Select
Add answer anonymously...
Practo Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits