Question: Suppose your algorithm for sorting an array is to divide it in half, and take halves and divide them in half again, doing this until

Suppose your algorithm for sorting an array is to divide it in half, and take halves and divide them in half again, doing this until each piece has 1000 elements. At this lowest division, selection sort is used to order those 1000 elements. The parts are then merged together, all the way back up to the complete ordered array. What can be said about the performance of this algorithm for large arrays?
Question 9 options:
The algorithm is the same order as the selection sort
The algorithm is the same order as the merge sort
The algorithm performs as the average of the two sorts
The algorithm is slower than either of the two sorts by themselves

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 Programming Questions!