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