Quicksort is a fast general-purpose sorting algorithm. There are various implementations of the algorithm, but its basic operation always starts with the selection of a pivot. The pivot is a single index of the array that is ideally at the median of the array’s values. Once the pivot is selected, every value less than the pivot is sorted into a sub-array to its left, and everything greater than the pivot is sorted into a sub-array to its right. These sub-arrays are then sorted recursively using the same process until all the values in the original array are sorted. A visual animation of the algorithm’s steps goes a long way towards understanding how it works, so you may want to check out this helpful animation by Thai Pangsakulyanont.