Question: Simple code please thats easy to follow. C++ Write a program that can be used to compare Insertion Sort, Merge Sort and Quick Sort. Program

Simple code please thats easy to follow.

C++

Write a program that can be used to compare Insertion Sort, Merge Sort and Quick Sort.

Program must:

  • Read an array size from the user, dynamically an array of that size, and fill the array with random numbers
  • Sort the array with the Insertion Sort, MergeSort and QuickSort algorithms studied in class, doing a time-stamp on each sort.

Use your program to measure and record the time needed to sort random arrays of size 5000, 50000, and 500000. For each array size, obtain a printout of the time required for the sorts.

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!