How can I get better at solving programming problems beyond the basics?

August 13, 2026 4 answers
Asked by poster_tube
I often feel like I'm not good at coding because every new problem seems to involve a technique I haven't learned yet. For example, I recently encountered the two-pointer technique in a homework assignment and had no idea it existed, while some of my friends seemed to recognize it immediately. How do people learn these problem-solving patterns, and what's the best way to become capable of handling problems that aren't completely basic?

Answers

Frizzle
Donโ€™t compare your learning process to friends who happened to recognize one pattern faster. Everyone has topics that click at different speeds, and struggling with a technique doesnโ€™t mean you lack ability. Feeling like an impostor is common among people who are actively pushing themselves, so focus on steady progress rather than whether you already know every trick.
Reply to this answer
reed switch
This feeling is extremely common. Programming techniques usually become familiar through repeated practice rather than sudden talent. Solve lots of problems, review solutions when youโ€™re stuck, and then write a few similar problems yourself so the pattern becomes easier to recognize.
Reply to this answer
sugar-free-tea
Try working through problems on paper before opening your editor. Write down the inputs, possible steps, and what information needs to be tracked. Predict what the algorithm should do, then test your idea in code. Comparing your prediction with the actual result helps expose exactly what you donโ€™t understand instead of encouraging random trial and error.
Reply to this answer
_12th curtain call
When you learn a technique like two pointers, donโ€™t stop after understanding one solution. Find or create several exercises that specifically use it, then try to explain why the technique works and what conditions make it appropriate. After a few variations, it becomes much easier to spot in unfamiliar problems.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions