Playing around with Sorting-Applets

Playing with Sorting Applets

Insertion Sort I
(select minimum)
Insertion Sort II
(swap, if smaller)

Bubble Sort

Quick Sort

Heap Sort
Bi-Directional
Bubble Sort
Click on Panels to start algorithm

You can also run them 'against' each other, but do not be deceived - just because one algorithm seems to run faster here, it is not clear that this is acutally true. (At least in my Web Browser, the Java Virtual Machine is not entirely fair in it's scheduling of the threads). But it if fun to watch them work. The number they display at the end reflects, how often two array elements were compared.
If you are curious, feel free to have a look at their source code.

The Sources

The applet that makes this sorting work.
The "generic" sorting algorithm.

The first insertion sort algorithm (search for minumun, then insert)
The second insertion sort algorithm (swap every time, a smaller value was found)
The Bubble Sort algorithm.
The Quick Sort algorithm.
The Heap Sort algorithm.
The Bi-directional Bubble Sort algorithm.

This applet and HTML stump was borrowed from the "Java Bible" (Aaron Walsh and john Fronckowiack); I just took the liberty to extend their three-headed family of sorting algorithms.
webmaster - Last modified: Wed Sep 22 18:20:40 1999