LeetCode patterns: the skill nobody trains
Elman Huseynov · 2026-08-14 ·
Ask a developer to write binary search. Most will manage it.
Show them a problem that needs one, without the words. Most will miss it.
The second one is what interviews test.
The second one is also the one nobody practises. Every tutorial announces the answer in its title.
That order is why people hate algorithms.
What recognition is
An experienced person reads a statement. Something fires in about 10 seconds.
What fires is a shortlist.
"This smells like a window." "This is a graph in disguise." "The answer is monotonic, so I can search over it."
This recognition is a learned mapping. It runs from surface features to a small set of candidates.
Chess players have the same thing for board positions. Psychologists call it chunking.
Chunking comes from exposure. Exposure can be arranged.
Most people get it 30 seconds at a time, as a prelude to an hour of coding. Practise it on its own and the ratio changes.
The signals are few, and learnable
Most interview problems come from about 50 patterns. Each has a handful of tells.
Two pointers from both ends. The input is sorted. The answer is a pair.
Sliding window. Contiguous, substring, subarray. Plus longest, shortest, or a count under a limit.
Binary search on the answer. The smallest or largest value that still works. Checking one value is easy.
Heap. The k best of something. Or the smallest item, over and over.
Monotonic stack. For each element, the next thing bigger or smaller.
Union-find. Things merge into groups. You keep being asked if two are in the same one.
Six patterns. One line each. You can hold that today.
Firing on them automatically is the work.
Learn the near misses
Signals are half of it. The other half is the pattern standing next to it, looking almost right.
Two pointers against sliding window. Both walk two indices. Two pointers converge from the ends and need sorted input. A window moves both indices the same way.
Greedy against dynamic programming. Both build an answer step by step. Greedy is safe only when a local choice can never be regretted.
BFS against DFS. Both visit every node. Shortest path in an unweighted graph has one correct answer.
Sorting against a heap. Both give you order. Top 3 of a million? Sorting the million is the wrong tool.
Recognition breaks here. On the two that look alike.
How to train it
Hide the category. Shuffle a list, cover the tags, or use a source built for it.
Answer before solving. The pattern, and the words that told you. 3 minutes.
Stop after 3 minutes. Move on once you have the right answer. Solving eats the time you need for repetitions.
Log every miss as a pair. What it was. What you said.
Mix old material in. Recognition tested on this week's topic only reminds you which week it is.
Twenty prompts an hour is normal. Two hundred is a few weeks of light practice.
Recognition shifts at roughly two hundred prompts.
Where this sits in a week of work is in how to prepare properly.
What it feels like when it works
You read a problem and your first thought is a category.
You still do all the work of solving it. But you know what kind of work it is.
The panic that comes from a blank statement stops arriving.
Interviews change in a second way. A plausible approach in the first minute buys you a conversation. Four minutes of silence buys you a hint, and hints cost.
Where I put this into practice
The recognition trainer is why AlgoPath exists.
52 patterns with their signals and their near misses. 194 unlabelled prompts. A timed gauntlet. A matrix showing which pairs you personally swap.
The first 33 steps are free, and the trainer works inside them.