Question 1
Input: 31 apple 56 grape 78 5 cherry
Step 1: Sorted words → apple cherry grape
Step 2: Sorted numbers → 5 31 56 78
Step 3: Interleave (number, word, number, word...) → 5 apple 31 cherry 56 grape 78
What is the final output?
Words sorted alphabetically, numbers sorted ascending, then interleaved in pattern: number, word, number, word... → 5 apple 31 cherry 56 grape 78