Question: 3 algorithms are insertion sort, merge sort, and heap sort. 4. (15+15-30 points) (1) Suppose an internet company wants to sort a very large set

3 algorithms are insertion sort, merge sort, and heap sort.3 algorithms are insertion sort, merge sort, and heap sort. 4. (15+15-30

4. (15+15-30 points) (1) Suppose an internet company wants to sort a very large set of numbers, and the company has multiple powerful computers to work in parallel. Which sorting algorithm should we choose? Please explain your reason. (2) We know that insertion sorting costs (n2) time for n numbers, because we ust simply assume that each "shift" and "comparison" costs constant time. Here "shift" means shift a number from one location to another in the memory, and "comparison" means compare two numbers. But if we specify the running time for each "shift" and "comparison" to be a and B respectively (which are not constants), what about the total time complexity of insertion sort

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!