Simple code please thats easy to follow. C++ Write a program that can be used to compare...

90.2K

Verified Solution

Question

Programming

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 thatsize, and fill the array with random numbers
  • Sort the array with the Insertion Sort, MergeSort and QuickSortalgorithms studied in class, doing a time-stamp on each sort.

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

Answer & Explanation Solved by verified expert
4.0 Ratings (403 Votes)
Please find the code belowmaincppinclude include include include include include using namespace stdchronousing    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students