Bubble Sort
ComparisonRepeatedly compares adjacent elements and swaps them if out of order, bubbling the largest value to the end each pass.
Interactive Algorithm Learning
Step through 7 classic sorting algorithms with color-coded bar charts, call stack displays, and full playback controls. Perfect for learning data structures and algorithms.
Repeatedly compares adjacent elements and swaps them if out of order, bubbling the largest value to the end each pass.
Finds the minimum element in the unsorted portion and places it at the beginning, growing the sorted section one element at a time.
Builds a sorted array one element at a time by inserting each new element into its correct position within the already-sorted portion.
An improved insertion sort that compares elements separated by a shrinking gap, allowing faster long-distance element movement.
Recursively divides the array in half, sorts each half, then merges them back together — guaranteeing O(n log n) performance always.
Picks a pivot element and partitions the array around it, recursively sorting each partition. The fastest in practice on average.
Builds a max-heap from the array, then repeatedly extracts the maximum element and places it at the end to build the sorted result.