Explore BrainMass
Share

Algorithm for insertion and merge sort

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Suppose that we compare the insertion sort method with the merge sort method in the same computer.
For entries of size n, the classification with insertion requires 8n^2 steps, while classification with merge requires 64n*lg(n) steps. For which values of n, does insertion sort method outclass the merge sort method? Please explain.

© BrainMass Inc. brainmass.com March 21, 2019, 5:56 pm ad1c9bdddf
https://brainmass.com/computer-science/sorting/algorithm-insertion-merge-sort-238591

Solution Preview

Suppose that we compare the insertion sort method with the merge sort method in the same computer. For entries of size n, the classification with insertion requires 8n2 steps, while ...

Solution Summary

This provides an example of determining insertion sort and merge sort method.

$2.19