Quick Sort Visualization


Quick Sort - Sorting Algorithm Visualizer

DESCRIPTION

Quick Sort is a sorting algorithm based on splitting the data structure into smaller partitions and sorting them recursively until the data structure is sorted.

This division in partitions is done based on an element, called the pivot: all the elements bigger than the pivot get placed on the right side of the structure, while the smaller ones go to the left, creating two partitions. Next, this procedure gets applied recursively to the two partitions and so on.

This partition technique based on the pivot is called Divide and conquer. It's a performant strategy also used by other sorting algorithms, such as Merge Sort.

Quick Sort is a highly efficient, comparison-based sorting algorithm that follows the **divide and conquer** paradigm. It is widely used due to its speed and in-place sorting capability, making it suitable for large datasets.

The algorithm works by selecting a **pivot** element from the array and partitioning the remaining elements into two subarrays—one with elements smaller than the pivot and another with elements greater than the pivot. These subarrays are then recursively sorted, ultimately leading to a fully sorted array.

COMPLEXITY

Average Complexity O(n × log n)
Best Case O(n × log n)
Worst Case O(n²)
Space Complexity O(n)
Quick Sort Visualization

QUICK SORT IMPLEMENTATION

                    
                
Quick Sort Visualization