Quick Sort

Noun · Development

Definitions

  1. A divide-and-conquer sorting algorithm that selects a pivot element, partitions the array into elements less than and greater than the pivot, then recursively sorts each partition. It runs in O(n log n) average time and sorts in-place, but degrades to O(n²) on adversarial inputs without careful pivot selection (e.g., median-of-three or randomized pivots).

    In plain English: A fast way to sort a list by repeatedly picking a reference value and splitting everything into 'smaller' and 'bigger' groups until the whole list is in order.

    Example: "The standard library uses introsort — quick sort for the common case, but it falls back to heapsort if recursion depth gets too deep."

Related Terms