$29
Write a complete program, to collect statistics on a series of sorts
The main program will continue the following until the end of the set of data.
Step 1: The read method will first read a heading describing the group of numbers (ie: - the heading maybe 10 numbers in order, 50 numbers in random order or 100 numbers in reverse order). Then it will read in a group of numbers. The original group should be printed out as it is read in.
Step 2: The three sorts should all receive the data in their original order before sorting.
After each individual sort finishes the sorted array should be printed. You should add code and then print for each sort the number of comparisons and/or interchanges that each of the 3 sorts required. You can use global variables to track these counts.
You can then compare the 3 types of sorts to see for each set which did the best most efficient job.
Remember that each group of data must start with a heading describing what it is testing. You are allowed to have repeats in the group but there should not be too many repeated values. You should include at least the following 9 groups (the heading for a group can be what I use to describe it).
Data to be used: