Question 1
Input: 31 7 54 64 89 36 16 94
Step 1: Even numbers (sorted): 16 36 54 64 94
Step 2: Odd numbers (sorted): 7 31 89
Step 3: Combine (evens then odds): 16 36 54 64 94 7 31 89
What is the final output?
Even numbers first (sorted ascending), then odd numbers (sorted ascending): 16 36 54 64 94 7 31 89