Question 1
Input: hat ant cat orange lion
Step 1: Identify vowel-starting words: ant orange
Step 2: Identify consonant-starting words: cat hat lion
Step 3: Sort each group alphabetically
Step 4: Combine (vowels first, then consonants): ant orange cat hat lion
What is the final output?
Words starting with vowels come first (sorted alphabetically), followed by words starting with consonants (sorted alphabetically): ant orange cat hat lion