Reverse vowels in a given string
Submissions: 1210   Accuracy:

36.56%

  Difficulty: Easy   Marks: 2

Given a string, your task is to reverse the vowels of string.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a string.

Output:
Print the string with the vowels reversed.

Constraints:
1<=T<=10^5
1<=length of the string<=10^5

Example:
Input:

2
hello world
geeks for geeks

Output:
hollo werld
geeks for geeks

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil
Author: Ayush Govil 1


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.