Given that Insertion sort is worst case (n2) and Merge sort is worst case (nlg n):
Fantastic news! We've Found the answer you've been seeking!
Question:
Given that Insertion sort is worst case θ (n2) and Merge sort is worst case θ(nlg n):
Under what conditions would Insertion sort outperform Merge sort? You can give a concrete example of this and show/plot the growth of the function as a graph.
Describe scenario(s) in which Insertion sort may be preferable to Merge sort as it is implemented in the pseudocode ?
Related Book For
Financial Accounting and Reporting a Global Perspective
ISBN: 978-1408076866
4th edition
Authors: Michel Lebas, Herve Stolowy, Yuan Ding
Posted Date: