Question: Question 3 (Sorting) (16 points = 4*4 points) An int array stores the following values. Use the array to answer the following Multiple Choice questions.

Question 3 (Sorting) (16 points = 4*4 points) An int array stores the following values. Use the array to answer the following Multiple Choice questions. 3.1) Which of the following lists of numbers would accurately show the array after the first pass through the Insertion Sort algorithm? A) 9, 4, 12, 2, 6, 8, 18 B) 4, 9, 12, 2, 6, 8, 18 C) 2, 4, 12, 9, 6, 8, 18 D) 2, 4, 6, 8, 9, 12, 18 E) 2, 4, 9, 12, 6, 8, 18 3.2) Which of the following lists of numbers would accurately show the array after the second pass of the Insertion Sort algorithm? A) 9. 4, 12, 2, 6, 8, 18 B) 2, 4, 9, 6, 12, 8, 18 C) 4, 9, 12, 2, 6, 8, 18 D) 2, 4, 6, 8, 9, 12, 18 E) 2, 4, 12, 6, 8, 9, 18 3.3) Which of the following lists of numbers would accurately show the array after the fourth pass of the Insertion Sort algorithm? A) 9, 4, 12, 2, 6, 8, 18 B) 2, 4, 6, 9, 12, 8, 18 C) 2, 4, 6, 8, 9, 12, 18 D) 2, 4, 6, 9, 8, 12, 18 E) 2, 4, 9, 12, 6, 8, 18 3.4) How many passes will it take until the Insertion Sort algorithm terminates? (Remember, although the array may get sorted, selection algorithm will not stop until it terminates) A) 2 B) 4 voa
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
