Question: We proved that Insertion Sort is a ( n 2 ) algorithm and Merge Sort is a ( n lg n ) algorithm. That might
We proved that Insertion Sort is a n algorithm and Merge Sort is a n lg n algorithm. That might seem to indicate that Merge Sort is always a better ie faster algorithm than Insertion Sort. However, given an input sequence of numbers to sort, list two reasons why Insertion Sort might actually run a lot faster ie fewer steps than Merge Sort. Running both algorithms on the same processor.
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
