next up previous
Next: Up: Previous:

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: Up: Previous: