CS 201: Data Structures

Timing Sorting Algorithms

Partners: you may work alone or with a partner of your choosing

Just before midterm break, you timed several search structures on a spell-checking task, in hopes of getting insight into whether the theoretical running times of the various algorithms were consistent with your observations.

In this assignment, you'll do another round of timing, graphing, and discussing. This time, the subject will be a small collection of sorting algorithms: insertion sort, selection sort, mergesort, and heapsort. The first three are already implemented in Sorter.java. You'll have to implement heapsort yourself.

As before, please submit a short (no more than 3 pages) PDF document and any code you write. In the document, use timing data and whatever tools you deem appropriate to discuss whether your timing observations are consistent with the theoretical O/Ω/Θ bounds on each algorithm. Specifically, please address the following questions:

Start early, ask questions, and have fun!