Question 1
Input: 46 20 37 61 47 14 89 43
Step 1: Identify prime numbers: 37 43 47 61 89
Step 2: Identify composite numbers: 14 20 46
Step 3: Combine (primes first, then composites, each sorted ascending): 37 43 47 61 89 14 20 46
What is the final output?
Prime numbers first (sorted ascending), followed by composite numbers (sorted ascending): 37 43 47 61 89 14 20 46