CS230 - Assignment 4

Use the Sort Statistics Applet to gather statistics on the behavior of the sorts algorithms we have studied.  Try input sizes of 2i  for i going as large as you can.  Try input which is random, sorted and reverse sorted.

Once you have gathered the statistics then you need to start analyzing it to see if it corresponds to what we have discussed in class.  It will probably be helpful for you to represent your results graphically.  (Excel does some nice bar graphs).

Write a paper which discusses your analysis of these statistics.  The paper should address the following questions:

  1. Was the growth rate of the number of compares, swaps, moves, and running time what you expected?  As n doubled what happened to these values?  Explain the results that you got as best you can.
  2. Discuss the pros and cons of each of the sort algorithms.  Which sorts would you use under certain situations?

Your paper will be graded both on content and clarity of exposition.