VOOZH about

URL: https://www.geeksforgeeks.org/dsa/program-remove-vowels-string/

⇱ Program to remove vowels from a String - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Program to remove vowels from a String

Last Updated : 23 Jul, 2025

Given a string, remove the vowels from the string and print the string without vowels. 

Examples: 

Input : welcome to geeksforgeeks
Output : wlcm t gksfrgks

Input : what is your name ?
Output : wht s yr nm ?

A loop is designed that goes through a list composed of the characters of that string, removes the vowels and then joins them.  

Implementation:


Output
GksfrGks - Cmptr Scnc Prtl fr Gks

Time Complexity: O(n), where n is the length of the string
Auxiliary Space: O(1)

We can improve the above solution by using Regular Expressions

Implementation:


Output
GksfrGks - Cmptr Scnc Prtl fr Gks

Time Complexity: O(n), where n is the length of the string
Auxiliary Space: O(1)

Comment