Quick Sort

A recursive divide-and-conquer algorithm that subdivides an array into single-element subsections, using a "pivot point" against which the other elements are compared. Numbers lesser than the pivot are placed in a subsection to its left, and numbers greater than or equal to the pivot are placed in a subsection to its right. When all subsections have been divided and sorted, they are joined back together in their proper order. Quicksort works most efficiently when the pivot point is close to the median value of the dataset, performing close to O(n log n); in the case where the pivot is always the smallest value, it performs at O(n^2) due to not being able to delegate anything to the left side partition.