Programming
Problem Solving
How to actually solve programming problems — the process, every pattern and when to use it, complexity, data structures, worked examples, and how to get good.
Updated 2026-06-17 · 21 min read
Solving coding problems is a skill, not talent — and like any skill it's mostly a set of repeatable habits plus a library of patterns I can recognise. This note is the whole skill in one place: the process I run, the patterns and their tells, the complexity I need to hit, the data structures, worked examples, and how to actually get good.
The single most important idea: a problem is solved when I match it to a pattern I know. Everything below is about building that matching reflex.
What is problem solving?
A "problem" is just a gap. You're here — some starting point, the inputs, what you're given — and you want to be there — the goal, the output, whatever counts as "solved" — and the way across isn't obvious. Problem solving is the work of finding that way: figuring out a clear sequence of steps that turns the input into the output you want.
In programming specifically it's this: take a task described in plain English ("find the two numbers that add up to the target") and turn it into a precise, step-by-step procedure a computer can follow — an algorithm. The code is just that procedure written down in a language. So the real job isn't typing code; it's working out the steps.
Two things worth keeping separate in your head:
- Knowing the language — syntax, what a
forloop is, how a list works. Necessary, but it's just vocabulary. - Solving the problem — deciding what steps to take. This is the actual skill, and it's a completely different muscle.
You can know every word of a language and still freeze on a problem — that's normal, and it's exactly the gap this note (and Start Here) exists to close. And the reassuring part, again: it's a skill, not a talent — trained by doing, not something you're born with.
Why do we even do this?
Fair question — why grind on this instead of just memorising answers?
- Programming is problem solving. Code is only the written form of a solution; the thinking is the job. Take the thinking away and there's nothing left to type.
- The computer can't think for you. It does exactly what it's told, in order, with zero common sense. Someone has to work out the instructions — that someone is you.
- It's the skill that lasts. Languages, frameworks and tools change every few years; problem solving doesn't. Learn it once and it transfers to any language and any job, for good.
- It's what real work and interviews actually test. Building a feature, fixing a bug, designing a system — all problem solving. Interviews (the whole DSA grind) test it on purpose, because it predicts whether you can do the job.
