Sorting Algorithms

Visualize and compare how different sorting algorithms process the same dataset in real time.

DefaultCompare / ReadSwap / WriteSorted

Bubble Sort

Steps: 0Best: O(n)Avg: O(n²)Worst: O(n²)Space: O(1)

Selection Sort

Steps: 0Best: O(n²)Avg: O(n²)Worst: O(n²)Space: O(1)

Insertion Sort

Steps: 0Best: O(n)Avg: O(n²)Worst: O(n²)Space: O(1)

Merge Sort

Steps: 0Best: O(n log n)Avg: O(n log n)Worst: O(n log n)Space: O(n)

Quick Sort

Steps: 0Best: O(n log n)Avg: O(n log n)Worst: O(n²)Space: O(log n)

Heap Sort

Steps: 0Best: O(n log n)Avg: O(n log n)Worst: O(n log n)Space: O(1)

Radix Sort

Steps: 0Best: O(nk)Avg: O(nk)Worst: O(nk)Space: O(n + k)

Shell Sort

Steps: 0Best: O(n log n)Avg: ~O(n^(3/2))Worst: O(n²)Space: O(1)