Algomination
Data Structures
AboutContact

Algomination

Learn algorithms and data structures through smooth, interactive visualizations.

SortingSearchingArray AlgorithmsData StructuresAboutContact

© 2026Algomination. Created by Omang Rawat & Rahul Soni.

Omang Rawat
Rahul Soni
All sorting algorithms

Quick Sort

Time O(n log n)Space O(log n)

Partitions around a pivot so smaller elements move left, then recurses on each side.

8
3
5
1
9
2
7
4
Starting Quick Sort.
Step 1 / 32
Sub-arrayPivotComparingSwappingSorted

About Quick Sort

Partitions around a pivot so smaller elements move left, then recurses on each side.

Time complexity: O(n log n). Space complexity: O(log n).

How it works, step by step

Core idea — Pick a pivot and partition the sub-array so smaller values move left and larger move right, then recurse on each side.

What each pass accomplishes — After each partition the pivot lands in its final sorted position — everything to its left is smaller and everything to its right is larger — so every partition permanently places at least one element. The two sides are then sorted the same way.

Use the interactive visualizer above to run Quick Sort on your own input and watch every comparison, swap, and operation animate step by step — pause, scrub, or replay at any speed.