Coding practice, 6 min, October 30, 2026
Big-O notation, explained without the math headache
Big-O is just a way to describe how slower a program gets as the input grows. Here is the intuition, the common classes, and how to talk about it in an interview.
Big-O sounds mathematical, but the idea is simple: it describes how the amount of work grows as the input gets bigger. It ignores constants and small terms because, at scale, only the growth rate matters.
The classes you will actually meet
- O(1) — constant: the same work no matter the size (a hash-map lookup).
- O(log n) — logarithmic: halving the problem each step (binary search).
- O(n) — linear: one pass over the input.
- O(n log n) — the cost of good sorting.
- O(n²) — nested loops over the same data; fine for small n, painful for large.
- O(2ⁿ) — exponential: usually a sign you need a better approach.
A quick way to estimate
Count the loops. One pass over the data is O(n). A loop inside a loop over the same data is O(n²). Each time you halve the search space, add a log n. Recursion that branches twice per call trends toward exponential.
“Big-O is not about the stopwatch. It is about how the stopwatch changes when the input gets ten times larger.”
Talking about it in an interview
State the time and space complexity of your solution before you are asked, and say whether you think it can be improved. Interviewers care less about the perfect answer than about whether you can reason about cost out loud.
Try it on your next question
Reptor reads a question on your screen and answers it with the model you choose — plus a short explanation so it sticks.
Download ReptorKeep reading
Troubleshooting · Nov 9, 2026 · 3 min
How to fix Windows Defender blocking Reptor
Windows Defender may flag Reptor because of its screen-capture overlay. Follow these quick steps to allow it permanently.
Learning science · Oct 28, 2026 · 6 min
Study faster with active recall (and where AI fits in)
Rereading feels productive but barely moves the needle. Here is the evidence-based way to revise — and how an on-screen answer tool supports it instead of replacing it.
Exam prep · Oct 21, 2026 · 5 min
Multiple-choice strategies that actually work
Beyond “eliminate two and guess.” Practical tactics for MCQ exams, and how to use them to learn rather than gamble.

