Case analysis and edge cases
- Stage
- 2
- Module
- M2.6
- Lessons
- 1
In this module
- Enumerate the edge cases a problem's own bounds allow, such as the smallest input, all-equal values, and ties.
- Check each edge case against the statement's exact wording, not against what a typical input looks like.
- Recognize when a case a bound allows is impossible to satisfy, and decide what your program should do there.
Before this module
Lessons
Practice
Try these on the judge. Each link opens the problem on WMOJ.
- 2024 J4Troublesome Keys (opens on WMOJ in a new tab) WMOJ
Find which two keys on a keyboard are malfunctioning, from what was typed and what appeared.
- 2025 S1Positioning Peter's Paintings (opens on WMOJ in a new tab) WMOJ
Find the smallest perimeter of a rectangular wall that holds two rectangular paintings.
- 2021 J1Boiling Water (opens on WMOJ in a new tab) WMOJ
Decide whether a measured boiling point means an altitude above, at, or below sea level.