Programming Problem 9 on Page 332 (include the counting sort and bucket sort)
The object of this programming assignment is twofold. You are to compare the relative performance of different sorting algorithms on the same data set and the same algorithm on different data sets.
Choose a sorting algorithm from each of the O(n^2) (i.e., selection, insertion and buble), O(n logn) (i.e., merge and quick), and O(n) (i.e., counting, bucket and radix) categories.
Randomly generate (1000, 10000, and 100000) integer values (in the range of 0 to 1000000) to be inserted into the data structures. Note that the list (i.e., the input values) itself should not be sorted and all algorithms should use the same input file when the input size is same.
Also, test the speed of algorithms when the input array is already sorted (for the same input data).
The following output should be provided for an average of 10 sorts of each algorithm and input size:
Bonus [2 points]: Run the algorithms with 1000000 values.
Note: You can only use (i.e., copy) code from the book and slides. You need to develop the rest of the code yourself.
You can run 2 instances of algorithms that take more than one hour.
Deliverables: (as source code or a pdf file)
Teaching Assistant: Shehryar Masaud
What to turn in: A softcopy of your sourcecode and reports should be uploaded to WebCampus. Combine the files in a single zip file.