What strategy helped me in making a progress in DSA problem solving

richacode
3 min readSep 11, 2021

At all places, we hear same story when asked, ‘how to get better in cp or problem solving on dsa?’ and the answer is always a very lame one — ‘Keep practising’ 😒

Although its correct but when someone like me, who has practised on various platform (hacker rank, codeforces, codechef, leetcode, spoj etc), I don’t benefit anything from this most lazy answer ever.

But recently some habit changes, drastically helped in coming up better and make some progress. Here are they:

  1. Revisiting some marked question that you found were good.

I made a list of some important questions in an excel, which were not too less , nor to many. It was enough to revise and re-solve without thinking that there are too many problem to solve. It has 2 benefits

  • I can now visualize it better - I cannot visualize and come up with solution and get into the depths of logic all at once on my first attempt. On second , third attempt, I can now invest more time in visualizing the logic as now I don't need as much time as in first attempt to understand the logic. Logic is not new to me this time.
  • I now have a belief in myself to solve because I somewhere in back of my mind , know that I can come up with some answer. This helped me to build up my confidence each time.
  • Also you might be now solving it faster.

2. Solving Topic wise Problem to have some patterns known to me of important topics that haunt me.

  • DP is difficult and it really is the breakpoint of my dream to become better in problem solving. So I picked up question from a very viral blog — Dynamic Programming Patterns (Written by Atalyk Akash) . I prepared and solved these question over a span of 1 month. And I highly recommend it as it did helped me in realizing some patterns and visualize dp better.
  • For preparing for Google or any other Faang company — I picked the topic wise question for google and solved them

The 1 and 2 are important and I guess this was what I was missing all this time and my progress was stagnant.

3. Be consistent as much as you could : I am not expert in consistency like many people post on linkedin with each day of the year as green. But I did tried to cover up on comming days and not stay out of touch of the topics. If I dont practise any new question , I go back to my set of question of excel sheet and mark them more green once I re-solve them

Not too consistent but this itself is an accomplishment for me. I have never kept with coding for these number of months.

4. Solve in whatever time you get:

As ‘Praise him’ song lyrics goes, you can follow the same for solving problems :

Solve it, solve it, solve it in the morning
Solve it in the noon time
Solve it, solve it, solve it when the sun goes down …

I read somewere, that those you like solving, they dont sit with a mindset, that they need large span of time to solve problems. They solve it in breaks, while waiting for someone, while waiting for dinner, while waiting for a match to start, before going to sleep, before start of a class, on holiday etc..

Its like they do it like we do any other thing, which you really like doing eg, play games. This help them to not hate coding but do it whenever they have time. This also helps to not think that you will not come up solution easily.

Keep believing and keep reconstructing your strategies and habit till you make progress!

👧

--

--