Quick Sort
SortingMediumPartition elements around a selected pivot and sort sub-arrays recursively.
Alt+Shift+Q
Configuration Panel
Pivot Partitioning Visualizer
230
81
562
123
384
55
726
167
Step: 1 / 1
Time Complexity
O(N log N) average/best, O(N^2) worst case (for skewed pivots)
Space Complexity
O(log N) recursive stack depth
Conceptual Overview
Quick Sort is a Divide-and-Conquer sorting algorithm that selects a 'pivot' element, partitions the array around it (smaller elements to left, larger to right), and recursively sorts the partitions.
Algorithm Idea
Pick a pivot (commonly the last element). Partition elements such that elements <= pivot sit on the left, and elements > pivot sit on the right. Repeat recursively.
Stable Sorting
Unstable (swaps can shift relative positions of equal elements)
In-place Memory
In-place (requires only recursive stack space)
Source: CP-Algorithms search & sorting reference