Bubble sort
Bubble
Ready
Time: --
Memory: --
Bubble sort repeatedly compares neighboring values and swaps them when they are out of order, slowly pushing larger values to the end.
Interactive project
Jordan BettsAlgorithm visualizer
This page generates a random array and animates how different algorithms compare, swap, and place values over time. It stays fully static, with all rendering and logic handled in plain JavaScript.
Array size
Animation speed
Algorithms to run
Sound effects
High bar counts and very fast animation can look great, but they may lag on some devices.
Bubble sort
Ready
Time: --
Memory: --
Bubble sort repeatedly compares neighboring values and swaps them when they are out of order, slowly pushing larger values to the end.
Selection sort
Ready
Time: --
Memory: --
Selection sort scans the remaining unsorted values to find the smallest item, then places it into the next sorted position.
Insertion sort
Ready
Time: --
Memory: --
Insertion sort builds a sorted section from left to right, inserting each new value into the correct place among the items before it.
Merge sort
Ready
Time: --
Memory: --
Merge sort splits the array into smaller pieces, sorts those pieces, and then merges them back together in order.
Quick sort
Ready
Time: --
Memory: --
Quick sort chooses a pivot, partitions smaller and larger values around it, and then recursively sorts each side.
Heap sort
Ready
Time: --
Memory: --
Heap sort organizes values into a max heap, repeatedly removes the largest value, and places it at the end of the array.
Shell sort
Ready
Time: --
Memory: --
Shell sort improves insertion sort by first comparing values across larger gaps, then reducing the gap until the array is fully sorted.
Radix sort
Ready
Time: --
Memory: --
Radix sort groups numbers by individual digits from least significant to most significant instead of comparing values directly.