Answered You can hire a professional tutor to get the answer.

QUESTION

Please read and follow all requirements below. Write a program that performs various sort processes on an array of 1000 records and an array of...

Hi, I need help with this. Please read and follow all requirements below. 

Write a program that performs various sort processes on an array of 1000 records and an array of 10000 records.  There are plenty of records (over 10900) to work with. Load the records in the arrays as per the program requirements (1000 element and 10,000 element). Each record has three data members: a string, a 4-digit integer, and a 7-digit integer. Use either a struct to maintain the arrays of records. Use this data file (http://www.mediafire.com/download/1of48k4s5v6um62/data.txt). Base the sorts on the 4-digit integer.

For sorting program results provide descriptions that are detailed for anyone to understand. For example

quicksort sort -> Array Size = 10000

# of comparisons=10000

# of item movements = 1685

Program:

Sort an array of 10,000 records using quicksort as follows:

a. Sort the array using pivot as the middle element of the array.

b. Sort the array using pivot as the median of the first, last, and middle elements of the array.

c. Sort the array using pivot as the middle element of the array. However, when the size of any sublist reduces to less than 20, sort the sublist using insertion sort.

d. Sort the array using pivot as the median of the first, last, and middle elements of the array. When the size of any sublist reduces to less than 20, sort the sublist using insertion sort.

e. Calculate and print the CPU time for each of the preceding four steps.

~~~~~~~~~~~~~

Use this program as a guide to write the programs above (insertionSort_example.txt - http://www.mediafire.com/download/xsn030ibab3l5iu/insertionSort_example.txt)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question