Next vowel
Next vowel easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Next vowel easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement:
Given a string of length n consisting of lowercase English letters. Find the vowels in the string and replace each vowel with it's next vowel in the alphabetic order.
Next vowel of a vowel is another vowel that comes after it in alphabet. Next vowel of { 'a', 'e', 'i', 'o', 'u'} are { 'e', 'i', 'o', 'u', 'a' } respectively. Input First line contains n. Next line contains a string.
Constraints 1 <= n <= 105 Output print the string after replacing each vowel with it's next vowel. Example Input: 4 deaf
Output: dief
Explanation: next vowel of 'e' = 'i' next vowel of 'a' = 'e'
link: