Sorting Demonstration

This page has visualizations of some comparison based sorting algorithms.
Click here to see instruction how to use system

Configuration

Sorting Algorithm :
Data Type :
List size :
Animation delay (ms) :

Auto running

Manual running

Algorithm description

Bubble sort

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order.

More info


Metric Value
Best case (big oh)
Average case (big oh)
Worst case (big oh)

Code listing

Simulation


Swap square

Number of swap

Number of comparison