0PricingLogin
Competitive Programming Academy · Lesson

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

  1. Counting Operations with Big-O
  2. The 10^8 Rule of Thumb
  3. Read Constraints, Pick Complexity
  4. Why TLE Happens and How to Spot It
← Back to Competitive Programming Academy