Question: Consider Insertion Sort and Merge Sort algorithms. Suppose we apply both algorithms on an array of size N , for N large. a . Which
Consider Insertion Sort and Merge Sort algorithms. Suppose we apply both algorithms on an array of
size for large.
a Which algorithm would work faster if the input array is already sorted? Explain your answer.
b Which algorithm would work faster if the input array is reversesorted ie sorted in decreasing order Explain your answer.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
