P18168 [GeeksforGeeks] Remove vowels from string1446
普及-
题目描述

Given a string, remove the vowels from the string.
Example 1:
Input: S = "welcome to geeksforgeeks"
Output: wlcm t gksfrgks
Explanation: Ignore vowels and print other
characters
Example 2:
Input: S = "what is your name ?"
Output: wht s yr nm ?
Explanation: Ignore vowels and print other
characters
Your task:
Your task is to complete the function removeVowels() which takes a single string as input and returns the modified string. You need not take any input or print anything.
Expected Time Complexity: O(|s|)
Expected Auxiliary Space: O(1)
Constraints:
1 <= |S| <= 10^{5}
Alphabets are lower cases only

输入格式

见题面

输出格式

见题面

样例输入
S = "welcome to geeksforgeeks"
样例输出
wlcm t gksfrgks