Computer Science / Unit 3 CS 0126 short lesson, about 20 seconds
Best Case and Worst Case
Captions available
The idea
One algorithm carries several counts: the best case when the input cooperates, the worst case when it resists — each case analyzed on its own.
In practice
Hunting a word front-to-back through a dictionary costs one look when the word sits first, and every look when it sits last or nowhere.
Where people slip
Honest analysis reports the worst case.
Your place on the trail
Every lesson rests on earlier ones and opens later ones. Tap any to jump.
Builds on
Unlocks
- Nothing yet depends on this.
Something wrong in this lesson? Flag it · Sources for Computer Science