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