
You are given a string S which may contain a mix of uppercase letters, lowercase letters, and other characters. Your task is to find all the vowel characters within this string and return them as a new string.
Rules:
The first and only line of input contains a single string S.
Your function should return a single string containing only the extracted vowels. The runner code will handle printing this returned value.
Hello World
eoo
The program scans the string. The vowels, in order of appearance, are 'e', 'o', and 'o'.
Programming Is Fun
oaiIu
The vowels are extracted in their original order and case: 'o', 'a', 'i', 'I', 'u'.
The expected time complexity is O(N).
0 <= length of S <= 10^5
The string S can contain any standard ASCII characters.
Time Limit: 1 sec