Remove Vowels from a given String

Objective: Given a String, remove all the vowels from the string.

What Are Vowels?
The letters A, E, I, O, and U are called vowels. The other letters in the alphabet are called consonants.

Example:

Input String: algorithms @ tutorial horizon
Updated String: lgrthms @ ttrl hrzn

Approach:

Iterate through all the characters, if find vowel, skip it else add it to the result.

Code:


Output:

Input String: algorithms @ tutorial horizon
Updated String: lgrthms @ ttrl hrzn

__________________________________________________
Top Companies Interview Questions..-

GoogleMicrosoftAmazonFacebookmore..

If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment.
__________________________________________________

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: