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