next up previous
Next: Worst Case Up: l3 Previous: Partition

Partition

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



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


next up previous
Next: Worst Case Up: l3 Previous: Partition