This page is based upon Modified by Guido Bunsen.

Sorting Algorithms

We all know that Quicksort is one of the fastest algorithms for sorting. It's not often, however, that we get a chance to see exactly how fast Quicksort really is. The following applets chart the progress of several common sorting algorthms while sorting an array of data using constant space algorithms. (This is inspired by the algorithm animation work at Brown University and the video Sorting out Sorting from the University of Toronto (circa 1970!).)

Click on each applet to see the algorithm run. Click on the name of the algorithm to see the source.
Bubble Sort
(by James Gosling and
Jason Harrison)

Bi-Directional Bubble Sort
(by James Gosling)

Selection Sort
(by Jason Harrison)

Shaker Sort
(by Jason Harrison)

Insertion Sort
(by Jason Harrison)

In-Place Merge Sort
(by Jason Harrison)

Double Storage Merge Sort
(by Jack Snoeyink)

Comb Sort 11
(by Jason Harrison)

Shell Sort
(by Jason Harrison)

Heap Sort
(by Jason Harrison)

Quick Sort
(by James Gosling)

Quick Sort with Bubblesort
(by Jim Boritz)

Enhanced Quick Sort
(by Jim Boritz)

Fast Quick Sort
(by Denis Ahrens)

Swap Sort
(by Jason Harrison)

If you're going to make a copy of this demo, you'll need to also copy the the SortAlgorithm class and the SortItem class.

Sorting routines to be added:

Originally created by

James Gosling,
And modified by
Jason Harrison,
Jim Boritz,

Thanks to Jean-Luc Duprat who rebuilt this page for Netscape 2.0 and recompiled the applets with the JDK.

This is
Maintained by Jason Harrison ( Last modified: Tue Jan 13 14:58:10 1998.