Quicksort

Quicksort is a sorting algorithm that is used to sort items in an array. It was created by Tony Hoare in 1959, and it is still widely used today. Quicksort splits the array into two parts, and then continues to split those parts into more parts, and sorting along the way. It sorts by using a comparison sort. This means that it chooses a pivot point in a part of the array and then compares it with all the other points in that part of the array.
Algorithm.
Often the leftmost item is chosen as the pivot. The recursion means that the algorithm runs the same exact algorithm on the two partitions that were created by the comparisons to the pivot. Note that this algorithm will keep on partitioning the array into subarrays, and splitting those subarrays into even smaller subarrays. Each time it does this, it will choose a new pivot within the subarray and compare the items to the subarray. The base case is when the algorithm reaches a subarray with only one item, in which it just stops because one item does not need to be sorted.