Menu
CoddyTech

Remove Vowels

You get a string s made of English letters. Return the string you get by deleting every vowel from it. The vowels are a, e, i, o and u, in lower or upper case; y is not a vowel here. The letters that stay keep their order and their case.

Function

removeVowels(s: string) → string
sstring
the string of English letters to clean
Returnsstring
s with every vowel removed and the other letters in their original order

Constraints

  • 1 ≤ s.length ≤ 3 × 104
  • s contains only English letters (a to z, A to Z).
  • s contains at least one letter that is not a vowel, so the answer is never empty.

Examples

Input
s = "Interview"
Output
"ntrvw"
Explanation
Deleting I, e, i and e from Interview leaves n, t, r, v, w in that order. The capital I is a vowel too, so it goes.

lock icon+17 hidden tests on Submit

challenge icon

Follow-up

What if the text could hold any Unicode letter, such as É or ö? Which of them are vowels, and how does your test change?

Reset code
def removeVowels(s):
    # Write code here
Test cases

Case 1

Case 2

Case 3

Input

s = "Interview"

Expected

"ntrvw"