This is intended as a demonstration page for an introductory programming course, showing the step-by-step progress of various sorting algorithms. There are many other pages that have similar kinds of demonstrations (see the links on the right), but I feel that my approach is valuable as a complement to those pages. The source code shown (below on the right) is a "C-like" language, except that (a) I have omitted details such as variable declaration and typing, and (b) I use a pseudo-command "swap" to accomplish swapping two entries in the array. (I also used a pseudo-command "copy" in the merge-sort algorithm.) Also note that, because this page is intended as an educational tool, in some cases I sacrificed efficiency for brevity and (I hope) clarity, esp. in the two quicksort algorithms. This is a work-in-progress, and I am open to suggestions, criticisms, or fawning praise. I should also acknowledge that I blatantly pilfered some of the sorting source code from a variety of sites (marked with asterisks in the links list). Sorting Algorithms (Wikipedia)* — lots of information (as one would expect), and lots of other links. The Improved Sorting Algorithms Page (Pat Morin, Carleton University)* — run a three-way race between three algorithms of your choice (some very good, and some very bad). Sorting Algorithms Demonstration* — visual demonstration of many algorithms, plus lots of information about efficiency. Sorting Algorithm Animations* — still more visual demonstrations. Animated Algortithms: Sorting (David Howard) — a different approach to visualizing the sorting process; some of these are fun to watch (try "Ordered/Heap", or "Reverse/Shell"). xSortLab (David Eck, Hobart and William Smith Colleges) — visual demonstrations, and a timing mode allowing comparison of the algorithms. Sorting Algorithms (Dominique F. Thiebaut) — visual demonstration of several algorithms. Sorting Demos (Brian Borowski) — visual demonstration of several algorithms, including pseudo-code trace. "AniSort" Sorting Demos (Max Nagl) — visual demonstration of several algorithms, including trace (Java or C++). Sorting Demos (Rameen Mohammadi, SUNY Oswego) — visual demonstration of four algorithms, including C trace. Sorting Contest (H.W. Lang) — run eight algorithms at once. Sorting demo (Andrew Kitchen) — visual demonstration of four algorithms, including two parallel algorithms. The Heroic Tales of Sorting Algorithms — no demonstrations, but nice summary information.

Updates: (3/25/2008) Interface changed, and features added based on feedback from H.W. Lang and Dominique Thiebaut; (10/16/2009) Correction to shell sort, interface tweaks, links updated. (12/22/2011) Improved (leaner) Web page design. (11/12/2014) Added a timer for auto-run.

 Delay (ms): Step overfunction calls

 Method: Data: Numbers Words Bars Random type: Permutation (no repeats) Increasing Decreasing Shuffled (with repeats) Constant Array size: Last time: —

 Variables
blah