Question 1
Input: sun 15 91 neptune mercury 28
Step 1: Separate → Words: sun neptune mercury, Numbers: 15 91 28
Step 2: Sort numbers ascending → 15 28 91
Step 3: Sort words by length (then alphabetically) → sun mercury neptune
Step 4: Alternate (word, number, word, number...) → sun 15 mercury 28 neptune 91
What is the final output?
Words sorted by length (shortest first, alphabetically for ties), numbers sorted ascending, then alternated: sun 15 mercury 28 neptune 91