Read Constraints, Pick Complexity
Let N tell you which approach fits.
Constraints Are Clues
Every problem lists limits on n and the values. Those constraints quietly tell you which complexity the setter expects. 🔍
Read n First
Before designing anything, find the largest n in the constraints. The size of n decides whether quadratic, linear, or log is required.
All lessons in this course
- Counting Operations with Big-O
- The 10^8 Rule of Thumb
- Read Constraints, Pick Complexity
- Why TLE Happens and How to Spot It