Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago