next up previous
Next: Worst Case Up: CSE 2320: Algorithms and Previous: Partition

Partition

(pivot is the median of the sequence) leads to $\Theta(n lg n)$ like Merge Sort.



(maximally bad when array already sorted) leads to $\Theta(n^2)$ like Insertion Sort.



Copyright © 1998 The University of Texas at Arlington