Review: Analyzing Quicksort
What will be the worst case for the algorithm?
- Partition is always unbalanced
What will be the best case for the algorithm?
- Partition is perfectly balanced
Which is more likely?
- The latter, by far, except...
Will any particular input elicit the worst case?
- Yes: Already-sorted input