Solvequill Blog · coding · 7 min read · 48 views
Big-O makes sense when you imagine the input growing
Published:
-O is not about timing one run on your laptop. It is about how work grows when the input grows.
Use this post as a small study note for making better decisions while solving, not as a quick definition dump. Read the idea, pause at the example and try to move one line forward yourself, then use the checklist on a real problem.
The main idea
Ask what happens when the input size doubles. Does the work double, quadruple, or barely change?
The important part is not memorizing the method; it is noticing what calls the method into action. Which expression, diagram, unit, variable, or code behavior made this approach the right one? If you can name that trigger, a similar problem becomes much less stressful.
A short example
A single loop overnitems grows roughly linearly; a nested loop over the same list often grows quadratically.
1for item in items:2 process(item)34for a in items:5 for b in items:6 compare(a, b)How to approach it step by step
- Write the givens cleanly and fix units, symbols, or variable names before calculating.
- Identify the intermediate fact you need before trying to jump directly to the answer.
- After each line, run a small check: do the units match, is the sign correct, is indentation or scope correct in code?
- When you get an answer, return to the original question and check that it answers exactly what was asked.
Check while you solve
- Name the input size.
- Count repeated work, not syntax lines.
- Ignore constants only after you understand the main growth.
The common mistake
Performance talk becomes clearer when you say whatnactually represents.
The practical way to catch this mistake is to check the decision points, not only the final answer. Ask questions like: Why this formula? Why this component? Why this loop condition? That makes the answer stronger in content, not just in arithmetic.
Turn your own question into an explanation video
Type the question or upload a photo; Solvequill produces a narrated video that walks through the solution step by step.
Open Solvequill