A deep-space relay compresses outgoing lowercase text messages before transmission by dropping every vowel character (a, e, i, o, u), since ground control can reconstruct the message from consonants alone and every dropped character saves transmission bandwidth. Given the original lowercase message, output the compressed message obtained by deleting every vowel while preserving the relative order of the remaining characters.
A single line containing the string s, consisting only of lowercase English letters.
A single line: the string s with every vowel removed (this line may be empty if every character of s was a vowel).
Example 1
Input
banana
Expected
bnn
Explanation
Going through 'banana' character by character: b (keep), a (vowel, drop), n (keep), a (drop), n (keep), a (drop). The remaining characters in order are b, n, n, giving 'bnn'.
Example 2
Input
aeiou
Expected
(empty)Explanation
Every character in 'aeiou' is a vowel, so all five are dropped and nothing remains, giving an empty output line.
Ready to solve this?
Sign in to open the editor, run your code against the sample tests, and submit against the full test suite.
Sign in to solve →