Mail
Say hi!
YouTube
Subscribe
GitHub
Peek at my code
Instagram
See my stories
Pinterest
Grab some ideas
X
Follow on X
TikTok
Let's make algorithms visual
Facebook
Join the community
LinkedIn
Let’s connect
Home
VisualLab
Blog
Gallery
ToolKit
Toggle menu
Loading...
Visualizations
VISUALLAB
Bubble Sort
Repeatedly swaps adjacent elements if they are in wrong order until the largest values bubble to the end.
Algorithms
Sorting
O(n²)
Cocktail Shaker Sort
See bubble sort pass in both directions, pushing large values right and small values left each round.
Algorithms
Sorting
O(n²)
Selection Sort
See the smallest remaining element get found and swapped into place, one position at a time.
Sorting
Comparison
In-place
Unstable
O(n²)
Insertion Sort
See each element get lifted out, larger values shift right to make room, and the element drop into its place, like sorting a hand of cards.
Sorting
Comparison
In-place
Stable
O(n²)
Gnome Sort
See a single pointer walk forward while neighbours are in order, and step back swapping whenever they aren't.
Sorting
Comparison
In-place
Stable
O(n²)
Comb Sort
See bubble sort compare far-apart values first, with a gap that shrinks each pass until it settles on neighbours.
Sorting
Comparison
In-place
Unstable
O(n²)
Merge Sort
See the array split into halves, each half sorted, and the halves merged back together through an auxiliary array.
Sorting
Comparison
Divide and conquer
Stable
O(n log n)
Visualizations | Onjsdev