CS 1723, Data Structures Assignment 8, Due April 30, 1997 Sorting Algorithms For this assignment, you are to write program(s) that will measure execution times of various sort algorithms. You can measure these times using the methods of the handout that timed the C builtin sort qsort(). (You can also measure times by some other method. Preferred is to do the measurement on runner, but failing that you can use any machine.) Each sort algorithm should: 1. Generate M random real numbers and store them in an array a[]. 2. By some method, sort the M numbers into increasing order. Note that at the end of this step the numbers would usually still be stored in a[], but not necessarily. 3. If they are not already there, store the numbers in the array a[]. 4. Run a check_sorted() function on the array a[] that will check that the numbers are indeed sorted into increasing order. Choice of M: For high-performance sorts, M should be at least 100000. For the low-performance sorts, choose M so that the sort will complete in a reasonable time (a minute or an hour). Choice of sort: You are to do one low-performance sort, perhaps insertion or selection sort. Then you are to do heapsort, along with two others of the various sorts we have studied: tree sort (can be adapted from the white book, the text, or class notes) merge sort (discussed in the lab) quicksort (presented in class; in white book and text) counting sort (presented in class, with a handout) Thus you should do four (4) sorts altogether, one low-tech sort, heapsort, and two (2) other high-performance sorts. Turn in listings and the timing results of runs. If you like, you can combine everything into one program.