Skip to main content
1 of 2
Raphael
  • 72.9k
  • 30
  • 181
  • 393

The term "Quicksort" stands for this abstract algorithmic idea:

  1. Pick a value $x$.
  2. Partition the input into $\{y\mid y \leq x\}$ and $\{y \mid y > x\}$.
  3. Recurse on the partitions (if they are non-trivial) and append the results.

You may want to generalise to multiple pivots, or create a third partition for elements equal the pivot, but mostly that's it.

There are many, many implementations. All of them are called "Quicksort", but many modify the name. See here for a discussion about the differences of these particular two variants.

Raphael
  • 72.9k
  • 30
  • 181
  • 393