![]() |
VOOZH | about |
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:
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:
GksfrGks - Cmptr Scnc Prtl fr Gks
Time Complexity: O(n), where n is the length of the string
Auxiliary Space: O(1)