Most core competitive programming techniques are learned the same way: you meet a pattern in a problem, you fail to see it, someone names it, and then you practise that name until it becomes a reflex. The efficient path is not to read a long list of algorithms front to back. It is to build a small toolkit, one pattern at a time, and verify each one against problems you can already solve.
Learn patterns in a fixed order
There is a rough dependency order that saves months of confusion. Start with arrays and loops, then sorting and binary search, then prefix sums and two pointers, then basic graph traversal, and only then dynamic programming. Each step uses the previous one, so skipping ahead means memorising code you cannot adapt.
For every new pattern, write down three things in your own words: what structure it needs, what it costs in time, and one problem shape where it applies. If you cannot fill the third line, you have read about the pattern but not learned it.
Study solutions you could not write
The highest-value hour in a week is the one spent reading editorials for problems you failed. Read until you can shut the page and restate the key idea in a sentence. Then close it and implement the idea from scratch. Copying a solution teaches typing; rebuilding it teaches the pattern.
- Mark the exact moment the solution stops being obvious to you.
- Name the trick that resolves it, in plain language.
- Rewrite that trick as a reusable step you could apply elsewhere.
Practise retrieval, not re-reading
Re-reading notes feels productive and does very little. Instead, keep a list of technique names and, once a week, pick four at random and write the skeleton from memory: binary search on an answer, heap-based merging, breadth-first search on a grid. Checking your skeleton afterwards tells you far more than another pass through a book chapter.
Keep the skeletons short. Twenty lines you can reproduce beats two hundred lines you can only recognise.
Get feedback from the judge, not from your mood
Submit often, and treat verdicts as data. A wrong answer on a small case is more useful than a vague feeling of understanding. When you cannot find the bug yourself, compare against a brute force you trust on random small inputs; that habit alone builds more intuition than reading about testing.
Frequently asked
How many techniques should I learn at once?
Two or three at most. Rotate one familiar technique for confidence with one new one for stretch, and avoid starting a third until the new one appears in a solution without prompting.
Is it bad to look at hints early?
Looking after thirty honest minutes is fine. Looking after three minutes replaces the thinking that builds the pattern. Give each problem a real attempt, then take the hint without guilt.
Progress in competitive programming comes from a small number of patterns learned deeply, not a large number recognised vaguely. Choose the next technique, find two problems that need it, and keep going until the idea shows up on its own.