Question: 11. Short Questions: a) Given 1000 data in random order, what will be the runtime if you use Merge Sort to sort them? b) Given

11. Short Questions:

a) Given 1000 data in random order, what will be the runtime if you use Merge Sort to sort them?

b) Given the following three sets of data:

i) 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0

ii) 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20

iii) 0, 4, 2, 10, 8, 16, 14, 12, 20, 18, 6

Out of Selection Sort, Insertion Sort, Merge Sort and Quick Sort, which algorithm or algorithms will be best suited for each set (in terms of shortest runtime), and give corresponding runtime.

c) Explain the three steps of Divide and Conquer algorithm using the example of Merge Sort.

d) Apart from Merge Sort, give any other two examples where the Divide and Conquer Principle is used,

f) Explain why Selection Sort runtime does not depend on initial data arrangements?

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!