Question: Project 4 Write a C++ program that compares the execution time of Insertion Sort and Merge Sort for inputs of different size. The implementation of
Project 4
Write a C++ program that compares the execution time of Insertion Sort and Merge Sort for inputs of different size.
The implementation of Insertion and Merge Sorts are the same as we discussed in class.
First we must randomly generate inputs of different size, but a same input generated, must be applied to both sorts.
The output of your program should look like:
| Input Size | Insertion Sort (time in seconds) | Merge Sort (time in seconds) |
| 100 | xx.xx | xx.xx |
| 1000 | xx.xx | xx.xx |
| 10,000 | xx.xx | xx.xx |
| 50,000 | xx.xx | xx.xx |
| 100,000 | xx.xx | xx.xx |
| 200,000 | xx.xx | xx.xx |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
