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
Add answer anonymously...
Practo Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
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

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

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter