Annotated edit history of
QuickSort version 1, including all changes.
View license author blame.
Rev |
Author |
# |
Line |
1 |
CraigBox |
1 |
A sorting [Algorithm]. |
|
|
2 |
|
|
|
3 |
Quicksort is a "divide and conquer" algorithm that works by taking an array, breaking it into two points around a 'pivot' item, and quicksorting both the smaller arrays. On average it needs O(n log(n)) comparisons to sort n items, but in the worst case requires O(n2) comparisons. |
|
|
4 |
|
|
|
5 |
The tricky point is deciding which element to use as the pivot. |
|
|
6 |
|
|
|
7 |
There is an excellent write up, with psuedocode at WikiPedia:Quicksort. |
|
|
8 |
|
|
|
9 |
----- |
|
|
10 |
CategoryAlgorithm |