Sorting Algorithms - an animation
A lot of computing has to do with sorting through piles of data.
Finding the most efficient way to do that is the work of many PhD.s in computer science -- efficient sorting is somewhat of a black art.
Here is a wonderful website that illustrates some of the common sorting techniques along with different kinds of datasets.
Check out:
Sorting Algorithm Animations
These pages show 8 different sorting algorithms on 4 different initial conditions. These visualizations are intended to:
- Show how each algorithm operates.
- Show that there is no best sorting algorithm.
- Show the advantages and disadvantages of each algorithm.
- Show that worse-case asymptotic behavior is not the deciding factor in choosing an algorithm.
- Show that the initial condition (input order and key distribution) affects performance as much as the algorithm choice.
It takes a minute or two for the entire page to load. Click on the little green round things to select the animation.
Cool stuff!
Posted by DaveH at April 14, 2009 8:36 AM