Question: Merge Sort and Insertion Sort Programs In C++ Implement merge sort and insertion sort to sort an array/vector of integers. Write the code to collect

Merge Sort and Insertion Sort Programs

In C++

Implement merge sort and insertion sort to sort an array/vector of integers.

Write the code to collect running time data., you will now generate arrays of size n=5,000, 10,000, 15,000, 70,000. containing random integer values from 0 to 10,000 to sort. Output the array size n and time in seconds to the terminal using printf or cout. Name these new programs insertTime.cpp and mergeTime.cpp.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!