Saturday, November 29, 2008

Seeing sorts

Various sort methods animated. Awesome. [Link]
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's interesting to see that there is no perfect sort for all cases. Some work better than others under different starting conditions.

No comments:

Post a Comment