Editorial-VWL

PROBLEM LINK:

Practice
Contest

Setter: Anant Kumar
Tester: Jatin Nagpal
Editorialist: Jatin Nagpal

DIFFICULTY:
CAKEWALK

PREREQUISITES:
String Traversal

EXPLANATION:
Take a array of size 5, initialized with zeroes. Now traverse the whole string, if you encounter a vowel, then change the value of array’s 0,1,2,3 or 4 th index with 1, for vowel ‘a’,‘e’,‘i’,‘o’ or ‘u’ respectively.

Time Complexity:
O(N)

AUTHOR’S AND TESTER’S SOLUTIONS:
Author’s solution can be found here
Tester’s solution can be found here

2 Likes