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