An Insightful Empirical Comparison of Sorting Algorithms

Elena Machkasova

Presented at the Midwest Instruction and Computing Symposium (Nifty Assignments category).


We present a hands-on assignment for students in a junior-level Algorithms class that explores performance of sorting algorithms in practice. The assignment is set up as a competition to develop the fastest program to sort a large data file on a combined criterion: by the length of words and, within each group of the same length, alphabetically. The criterion allowed for a variety of approaches which led students to explore details of various sorting algorithms and to develop data-specific modifications. The paper presents the testing setup and discusses the results and the value of the assignment.