Best, average, worst case
Algorithm analysis considers different input scenarios. Best case analyzes optimal inputs; worst case analyzes adversarial inputs; average case assumes typical inputs. Worst case is most common analysis metric.
Real World
Google Search uses worst-case analysis to guarantee results return within milliseconds even when scanning billions of pages — if they only optimised for best case, some queries could take minutes.
Exam Focus
Always state the Big-O for each case separately; examiners award marks for all three with justification.
How well did you know this?