Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this project, you will implement a program (in c language) to compare the performance of the following sorting algorithms (insertion sort, merge sort, radix

image text in transcribedimage text in transcribedimage text in transcribed

In this project, you will implement a program (in c language) to compare the performance of the following sorting algorithms (insertion sort, merge sort, radix sort, and shell sort). . Your program should generate random arrays of data and compare|| their results as follows: 1. The user shall be given the following options to generate the randomly filled arrays with elements that are: a. Reversed Order b. Random c. sorted 2. Then the program should generate arrays with the following sizes be sorted (based on the strategy selected in the previous step): a. 1,000 b. 10,000 c. 100,000 d. 1,000,000 3. Select one (or more) sorting algorithm to sort the arrays with. 4. Generate a report into a file) containing the run-time of the selected sorting algorithms on the specified arrays (with their sizes and initial element strategy). Once the user has selected these options, your program should run the sorting algorithms on the specified arrays with their specified sizes and initial state. Your program should compute the actual time (in Once the user has selected these options, your program should run the sorting algorithms on the specified arrays with their specified sizes and initial state. Your program should compute the actual time (in seconds) of execution to sort the arrays. The data can be printed as follows: 1,000 10,000 100,000 1,000,000 n Sort Algorithm1 Time ... Algorithm2 Algorithm3 Also answer these questions: 1. What is the best sort algorithm (and why?) for the following Also answer these questions: 1. What is the best sort algorithm (and why?) for the following scenarios: a. When n size is small and the initial state of the elements is 1. Reversed Order 2. Random 3. sorted b. c. When n size is large and the initial state of the elements is i. Sorted ii. Random iii. Reverse order

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

Students also viewed these Databases questions

Question

7. Discuss the key features of the learning organization.

Answered: 1 week ago