Quick Sort Visualizer

Quick Sort is an efficient, divide-and-conquer sorting algorithm that selects a 'pivot' element and partitions the array around the pivot.

Try It Yourself

Adjust the array size and animation speed to see how Quick Sort performs on different data sets.

Comparison with Other Sorting Algorithms

AlgorithmBest CaseAverage CaseWorst CaseSpaceStable
Bubble SortO(n)O(n²)O(n²)O(1)Yes
Quick SortO(n log n)O(n log n)O(n²)O(log n)No
Merge SortO(n log n)O(n log n)O(n log n)O(n)Yes
Insertion SortO(n)O(n²)O(n²)O(1)Yes
Selection SortO(n²)O(n²)O(n²)O(1)No
Heap SortO(n log n)O(n log n)O(n log n)O(1)No