What Does Quicksort Mean?
Quicksort is a popular sorting algorithm that is often faster in practice compared to other sorting algorithms. It utilizes a divide-and-conquer strategy to quickly sort data items by dividing a large array into two smaller arrays. It was developed by Charles Antony Richard Hoare (commonly known as C.A.R. Hoare or Tony Hoare) in 1960 for a project on machine translation for the National Physical Laboratory.
Techopedia Explains Quicksort
Quicksort is an algorithm used to quickly sort items within an array no matter how big the array is. It is quite scalable and works relatively well for small and large data sets, and is easy to implement with little time complexity. It does this through a divide-and-conquer method that divides a single large array into two smaller ones and then repeats this process for all created arrays until the sort is complete.
The quicksort algorithm is performed as follows:
- A pivot point is chosen from the array.
- The array is reordered so that all values smaller than the pivot are moved before it and all values larger than the pivot are moved after it, with values equaling the pivot going either way. When this is done, the pivot is in its final position.
- The above step is repeated for each subarray of smaller values as well as done separately for the subarray with greater values.
This is repeated until the entire array is sorted.