Question: I just want the right answer without explanation. Question 9: Consider the following array: {7, 10, 5, 3, 8, 4, 2, 9, 6}; trace the

I just want the right answer without explanation.

Question 9:

Consider the following array: {7, 10, 5, 3, 8, 4, 2, 9, 6}; trace the Insertion Sort algorithm and specify the last exchange that occurs:

a.6 and 7

b.9 and 10

c.10 and 2

d.9 and 6

e.None of the answers

Question 10:

The following array {1, 3, 5, 7, 12, 34, 55} is

a.4-sorted

b.3-sorted

c.7-sorted

d.1-sorted

e.All answers are correct

Question 11:

Based on the Shell Sort algorithm provided in the slides, if the size of the array is 20, then the first value of h will be:

a.13

b.4

c.19

d.7

e.None of the answers

Question 12:

The following sorting algorithm is in-place and stable:

a.Selection Sort

b.Insertion Sort

c.Shell Sort

d.Merge Sort

e.None of the answers

Question 13:

Taking into account the worst-case scenario, the fastest algorithm we have covered is:

a.Selection Sort

b.Insertion Sort

c.Shell Sort

d.Merge Sort

Question 14:

Consider we want to execute method merge to an array of size 10, the value of lo, mid and hi are

a.0, 4 and 9 respectively

b.0, 5 and 10 respectively

c.0, 5 and 9 respectively

d.1, 5 and 9 respectively

e.None of the answers

Question 15:

Having an array of size 16, the last merge will be executed on:

a.The first (size 8) and second half (size 8)

b.The last two elements (indices 14 and 15)

c.The first two elements of the second half (indices 8 and 9)

d.The last element of the first half and the first element of the last half (indices 7 and 8)

e.None of the answers

Question 16:

Having an array of size 9, the first merge will be executed on:

a.The first (size 4) and second half (size 5)

b.The last two elements (indices 7 and 8)

c.The first two elements of the second half (indices 4 and 5)

d.The first two elements of the first half (indices 1 and 2)

e.None of the answers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!