Published on

How to Improve Your Programming Problem-Solving Skills?

featured Image

Most of us have heard the same advice: solving more issues will help you become a better problem solver. However, this approach is overly simple. It takes more than repetitions to become proficient at something. It's also how you approach the situation.

Furthermore, when programmers are told to "address more issues," they frequently believe that "more" equals "faster." It's a blunder I made when I first started out.

The problem-solving treadmill can be harmful to one's ability to learn and improve. I used to rush through one problem and go on to the next. However, the reality of that strategy eventually sunk in. By focusing on quantity over quality, I sacrificed quality and missed important lessons along the road.

That isn't to suggest that repetition isn't important; it is. Repetition, on the other hand, does not get to the heart of the subject. That's what the procedure accomplishes.

I'm personally interested in this issue since I want to enhance my problem-solving skills in order to advance as a programmer. So here's how I'm going to go about it. To be sure, it entails repetitions — but it also entails a great deal more.

1. Work on a variety of platforms to solve a variety of problems

"When I first started learning to code, I was intrigued with HackerRank," a Python tutor told me. Although having a preferred platform is excellent, don't limit yourself to just one. This is why: you must be prepared for everything.

One of my goals is to easily transition between different problem kinds and platforms. Interview Cake's challenges are not the same as those in Reuven Lerner's book Python Workout. Similarly, I found Lerner's Weekly Python Exercise problem statements to be distinct from those on HackerRank.


  • LeetCode
  • Cracking the Coding Interview by Gayle Laakmann McDowell
  • Exercism
  • Interview Cake
  • Python Workout by Reuven Lerner
  • Weekly Python Exercise by Reuven Lerner

When I construct my weekly plan on Sundays, I choose a few issues from the following sites. It's something I'm thinking about. For example, from LeetCode, I'll choose a task that focuses on binary search. Then there's one from one of Reuven Lerner's sources that concentrates on data structures.

This discipline keeps me from being too at ease. I won't be able to rely on the same data structure or method. I need to be able to choose the most appropriate tool for the job. I'm going to need to be able to pivot.

It also makes me think. That's because I deliberately choose situations that push me to my limitations, a trait described by psychologist Anders Ericsson as "deliberate practise."

2. Exercise Your Programming Brain in a Variety of Ways

Athletes that include cross-training into their programme are frequently mentioned. A runner, for example, may accomplish one or two bike workouts each week. It makes sense: cross-training forces athletes to work on their cardiovascular fitness from a new perspective.

I've already written on cross-training for programmers. However, there is still more to be said about the advantages of this strategy. I'm using cross-training to increase my mental fitness, much like an athlete does to improve their cardiovascular fitness.

Solving math puzzles is a part of my cross-training. In mathematics, I employ the same strategies I'd use to tackle a programming issue. The procedure is the same, but the situation is different.

3. Take notes on your solutions

When it comes to problem-solving, we all get stuck and make mistakes. We utilise our failures to assist us figure out what we should do differently in the future. Often, that's when the learning comes to a halt. We're eager to move on after we've fixed the problem. But don't do it.

That, according to mathematician Richard Hamming, is when learning should begin. "I believe that studying achievements is fundamentally more essential than studying failures...

"Because there are so many ways to be wrong and so few ways to be right," Hamming says in his book The Art of Doing Science and Engineering, "studying triumphs is more efficient."

4. Ask for feedback

Awareness has the potential to be a fantastic teacher.

Don't take your solutions for granted. Get feedback to find out for yourself. When it comes to growing better, feedback is crucial. It's also a part of intentional practise.

I get input in two different ways.

After I finish an issue, I research other people's solutions. LeetCode and Cracking the Coding Interview are two examples of resources that might help. Other times, I come across a programmer's answer to a similar situation. Use both on occasion.

The following step is the same in either case: I begin at the top of the answer and describe each line in my own words. For example, I wonder why the coder picked this specific data structure. Then, to reinforce the fundamental principles or new techniques that I just learnt, I create a brief overview of the programme.

Putting a complex concept, such as a line of code, into your own words is a terrific way to check if you truly grasp it. You'll also get some experience with another important skill: understanding code.

If there's something new to me, I do some research. I look at their code and compare it to mine. I am a student. I make a judgement. I am gaining knowledge. It's a long process, but I get a lot out of it.

The second option is to just ask another coder for input. Video calls are useful for going line by line through the code in real time. Pull requests, on the other hand, are valuable.

There's a reason for the feedback: use it! Put everything you've learned into practise.

5. Maintain Consistency

Let's move on to the subject of repetition. The ability to solve problems is a skill. It takes time to develop, just like any other ability. It just does not happen over the course of a weekend or over the course of a week. That is why I set aside time each day to solve problems.

"There's too much to learn," is a frequent attitude to this daily activity. I can't spend every day fixing problems."

There are two parts to my response. First and foremost, there will always be something new to learn.

Second, programming is primarily a problem-solving activity. It's a requirement of our trade. It is deserving of your time and attention on a daily basis. The caveat is that you should make your everyday practise purposeful.