Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Mortality rate

Answered: 1 week ago