D3: Sort algorithm walkthroughs

Here are visualizations of common sorting algorithms. Use the comparisons counter and number of items to observe the performance of each randomized case.

All source data is shuffled using the Fisher-Yates algorithm.

There's a fun clip about the sounds of sorting here.

Quick sort discussion

Source Code

Implementation

Notes

Merge sort discussion

Source Code

Implementation

Notes

Selection sort discussion

Source Code

Implementation

Notes

Insertion sort discussion

Source Code

Implementation

Notes

Shellsort discussion

Source Code

Implementation

Notes

Bubble sort discussion

Source Code

Implementation

Notes

O (n)