Analysis of Algorithms
University of South Carolina
September 16, 2010
Quicksort is a divide-and-conquer sort that takes (n2) time in
the worst case but (n lg n) time in the average case.
Like Mergesort, it splits the list in two, sorts both sublists
recursively, then recombines the results. Unlike Mergesort, the
major work is in splitting the list, while the recombination is trivial.
Worst-case running time: (n2).
Expected running time: (n lg n).