Purchase Solution

Algorithm for insertion and merge sort

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

Solution Summary

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

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 ...

Purchase this Solution


Free BrainMass Quizzes
C++ Operators

This quiz tests a student's knowledge about C++ operators.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Basic Networking Questions

This quiz consists of some basic networking questions.

C# variables and classes

This quiz contains questions about C# classes and variables.