FastPrepRemove Vowels from a String

Remove Vowels from a String

HSBC logoHSBC● EasyINTERNOA
Learn

Problem statement

The vowels of the English alphabet are (a, e, i, o, u, A, E, I, O, U). Write an algorithm to eliminate all vowels from a given string.

Input

The first line consists of a string.

Print a string that excludes all the vowels of the given input string.

Note

The vowels of the English alphabet are (a, e, i, o, u, A, E, I, O, U).

The input string contains English letters only.

Function

removeVowel(engStr: String) → String

Examples

Example 1

engStr = "haveaniceday"return = "hvncdy"

The output string is “hvncdy”.

Constraints

  • 0 ≤ len ≤ 100; where len is length of the input string.

More HSBC problems

See HSBC hiring insights
public static String removeVowel(String engStr) {
  // Write your code here
}
engStr"haveaniceday"
expected"hvncdy"
Checking account…