Back to All Algorithms
Quick Sort
Category: Sorting | Time: O(n log n) | Space: O(log n)
Visualization
Visual representation of the data structure
Enter an algorithm and input to start visualization.
About Quick Sort
An efficient, in-place, comparison-based sorting algorithm. It applies the divide-and-conquer strategy. It works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively.
Code Editor
The code is for reference. Editing it won't affect the visualization.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Frequently Asked Questions
About Quick Sort
Related Interview Questions
Practice with real problems