Remove Vowels from a String
Updated
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) → StringExamples
Example 1
engStr = "haveaniceday"return = "hvncdy"The output string is “hvncdy”.
Constraints
0 ≤ len ≤ 100; wherelenis 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