Sorting visualizer

Quick Sort

Partition values around a pivot and recurse.

Example Array
[42, 17, 8, 33, 25, 11, 60, 29]

Visualization

Ready
ComparingMoving / writingPivotSorted

Quick Sort is ready to partition around pivots.

Metrics

Comparisons0
Swaps0
Progress0%
Time taken0.0s

Pseudocode

  1. quickSort(arr, low, high)
  2. if low < high
  3. pivot = arr[high]
  4. for j from low to high - 1
  5. if arr[j] <= pivot
  6. move arr[j] to left partition
  7. place pivot between partitions
  8. quickSort(left partition)
  9. quickSort(right partition)
  10. return arr

About Quick Sort

Quick Sort chooses a pivot, moves smaller values before it and larger values after it, then recursively sorts both partitions.

Sorted Output

[ 8, 11, 17, 25, 29, 33, 42, 60 ]

Complete the visualization to reach this output.

Complexity Overview

Best CaseO(n log n)
Average CaseO(n log n)
Worst CaseO(n²)
SpaceO(log n)
StableNo