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..-

Google Microsoft Amazon Facebook more..

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

%d bloggers like this: