This page visualizes six different sorting algorithms working on identical randomly shuffled arrays of 100 elements. Each algorithm demonstrates different approaches to the sorting problem, from the divide-and-conquer strategy of Quicksort and Merge Sort to the simple but inefficient approaches of Bubble Sort and Insertion Sort.
Notice the dramatic differences in the number of operations required. The O(n²) algorithms (Bubble, Insertion, Selection) will take significantly more steps than the O(n log n) algorithms (Quicksort, Merge Sort). Each swap or move operation is captured as a frame in the animation.
O(n log n) average, O(n²) worst
O(n log n) average, O(n²) worst
O(n log n) guaranteed
O(n²) but minimal swaps
O(n²) but good for small/sorted data
O(n²) educational classic