I'm starting to realize that programming is about more than writing syntactically correct code. The difficult part is learning how to break down unfamiliar problems, recognize useful patterns, and develop an efficient solution.
I don't just want to memorize algorithms such as binary search. I want to understand how someone discovers that approach when they encounter a new problem. What resources, exercises, or learning process would you recommend for developing genuine problem-solving and algorithmic skills? If you were starting from zero, how would you structure your learning?
4 Answers
Start with any correct solution, even if it is slow or inelegant. Afterward, ask how it could be made faster, simpler, or more memory-efficient. For example, you might begin by scanning an entire array and later discover that sorting, hashing, or binary search gives you a better approach. That cycle of solving, reviewing, and improving is where much of the learning happens.
Problem-solving ability is developed much like physical strength: there usually isn’t one trick to memorize, and improvement comes from repeated practice with gradually harder challenges. Learn common algorithms as well, because they represent techniques people have already developed for recurring problems. Then practice recognizing when each technique is appropriate.
Work on the problem before touching the computer. Clarify what the task is asking, split it into smaller parts, and solve those pieces in plain language first. Flowcharts, bullet points, and pseudocode can help. Once the idea works on paper, test it with examples and then implement it.
Books such as “Think Like a Programmer,” “The Pragmatic Programmer,” “Structure and Interpretation of Computer Programs,” and “Code: The Hidden Language of Computer Hardware and Software” can also provide useful foundations.
The main answer is deliberate practice. Try solving a problem one way, then look for a different approach. Comparing the solutions helps you notice trade-offs and gradually builds intuition for choosing algorithms.

That distinction between planning the solution first and coding it afterward is really helpful. I’ll try using pseudocode and small examples before writing programs.