#C13507. Reverse Vowels of a String

    ID: 43053 Type: Default 1000ms 256MiB

Reverse Vowels of a String

Reverse Vowels of a String

Given a string, reverse only its vowels while keeping the order of the non-vowel characters unchanged. Vowels are defined as (a, e, i, o, u) and their uppercase counterparts. For example, if the input string is "hello", then the output should be "holle". The problem requires careful pointer manipulation to correctly reverse only the vowels without disturbing the consonants.

inputFormat

Input is a single string provided via standard input (stdin). The string can contain spaces and punctuation.

outputFormat

Output the transformed string to standard output (stdout) after reversing the vowels.## sample

hello
holle