Question: You are comparing implementation of insertion sort and merge sort on the same machine. For input size n, insertion sort runs 7n2 steps, while merge
You are comparing implementation of insertion sort and merge sort on the same machine. For input size n, insertion sort runs 7n2 steps, while merge sort runs in 49n lg n steps. For which values of n does insertion sort beat merge sort?
Step by Step Solution
3.34 Rating (145 Votes )
There are 3 Steps involved in it
To determine for which values of n insertion sort beats merge sort in terms of runtime we need to co... View full answer
Get step-by-step solutions from verified subject matter experts
