quicksort
Sort algorithms home
JavaCFORTRANPASCAL
sort
quicksort
Inherits from In-place sort
An in-place sort algorithm that uses the divide and conquer paradigm. It picks an element from the array (the pivot), partitions the remaining elements into those greater than and less than this pivot, and recursively sorts the partitions. There are many variants of the basic scheme above: to select the pivot, to partition the array, to stop the recursion on small partitions, etc. [National Institute of Standards and Technology]
Demonstrations: http://www.cosc.canterbury.ac.nz/people/mukundan/dsal/QSort.html
Implementations and sample code: http://www.cs.ubc.ca/spider/harrison/Java/QSortAlgorithm.java [Java]
http://www.cs.princeton.edu/%7Ers/talks/QuicksortIsOptimal.pdf [C]
See also quicksort variants: balanced quicksort, introspective sort