Quicksort is one of the more interesting sorting algorithms around because it has two peculiar properties.

Firstly, it's one of the faster sorts available (hence the name), with an average running time of O(nlogn). This is an interesting property because the actual running time of quicksort is O(n^2).

This is related to the other interesting property of quicksort - the input which yields the worst running time is rather embarassing... it is the ordered list. That is, quicksort is guaranteed to run longer if the input is already sorted.

Quicksort works by the good ol' divide and conquer approach; it chooses an element (called the pivot), and divides the remaining elements in two groups - elements smaller and greater than the pivot. This is done recursively and is notably fast because the inner loops are very quick and the comparisons are made against the same element, so it may be stored in a register. The sort is also done in-place.

The ordered list is the worst case because the two resulting partitions of input size n are of size 1 and n-1. Therefore, most implementations of quicksort are randomized, that is, the pivot chosen is a random element in the list. This yields an algorithm in which no input manifests the worst-case behavior.