FastPrepRemove Vowels from a String
Problems/Remove Vowels from a String

Remove Vowels from a String

HSBC logoHSBC● EasyINTERNOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Special thanks: 🌷 A special thank you to a lovely, amazing fren who shared that this question appeared again on November 21, 2026! (˶˃ ᵕ ˂˶) .ᐟ.ᐟ 🩵

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 Online Assessment questions

  • Organization Reputation After Employee DeparturesOA · Seen Nov 2026
  • Minimum Deletion Cost for Distinct Adjacent CharactersOA · Seen Oct 2026
  • Distinct Products After Removing One ElementOA · Seen Sep 2026
  • Minimum Cleaning Robot RunsOA · Seen Sep 2026
  • Minimum Satellite Data Transfer IterationsOA · Seen Aug 2026
  • Find ID of SoldierOA · Seen Jun 2026
  • Find Most Frequently Purchased ProductsOA · Seen Jun 2026
  • Minimum Markers to Clear Line SegmentsOA · Seen Nov 2025
  • Arrange Flower SticksOA · Seen Mar 2025
  • Find Largest House AreaOA · Seen Mar 2025

Similar questions at other companies

  • Minimum Changes for Distinct Adjacent CharactersHeadlands Technologies · OAHeadlands Technologies interview questions
  • Theme Park Shuttle Wait TimeAirbnb · OAAirbnb interview questions
  • REST API: Country CodesHackerRank · OAHackerRank interview questions
  • Fill One Exact-Length Binary WindowAmazon · OA
  • Branch with the Most FilesCapital One · OACapital One interview questions
  • Count User Mentions in Chat MessagesRamp · OARamp interview questions
  • Maximum Ones After K OperationsGoldman Sachs · OAGoldman Sachs interview questions
  • Total Each Letter's Count in an Encoded StringIBM · OAIBM interview questions
  • Robot Stops Left or Right (Forward Deployed Engineer)Boston Consulting Group · OABoston Consulting Group interview questions
  • Find Words That Can Be Formed by CharactersTabaPay · OA
All HSBC interview questionsSee HSBC hiring insights
Saved
class Solution {
    public static String removeVowel(String engStr) {
      // Write your code here
    }

}
Checking account…