CPSC 220 Fall 2005
HW 7: Sort Detective
Tar file sorts.tar contains executables
for the five sorts we discussed -- selection sort, insertion sort,
bubble sort, quick sort, and merge sort -- labeled Sort1, Sort2, Sort3, Sort4,
and Sort5. It also
contains the data files that were generated as part of the last homework.
Your job is to run these sorts on
the data files as needed and use the output to determine which file
corresponds to which sort. Save sorts.tar to your directory,
then untar it using tar xzf sorts.tar. This will create a
directory called sorts that contains the files above.
Use a table such as the one below (you may organize differently if you
wish) to record the results of your runs.
On a separate sheet, carefully explain how you arrived at your
conclusions as to which sort is
which. This explanation should be typed, not handwritten. Turn in both
the data that you collected and your explanation.
sort
| input file
| time to sort
|
Sort1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sort2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sort3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sort4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sort5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|