Sometimes algorithms vary
Algorithms sometimes perform poorly
- Quicksort is usually O(n log n) but can be O(n2) if the input is unfortunate
- Self-adjusting data structures may pause from time to time to adjust themselves
We might therefore talk about
- Worst-case performance
- Average performance
- Amortized performance