My tips for competitive programmers

Pankaj Kumar
4 min readApr 23, 2022

--

In college life, we all get introduction about programming. I started focusing on programming question, solving question at different website like codeforces, leetcode, atcoder, codechef in 3rd year for cracking interview. Now i have experience of 2+ year, and within these time I participate so many contest, solve many question, gain experience.

So In this blog you will know the essence of my entire experience so far.

✨ These are some tips

These all tips are related to each other

🎯 1. Read question carefully, calmly

During the live competition, when we start reading the question, we get tensed to solve the question as soon as possible for better rank. But because of this we miss out on mentioning important pointers/points and try wrong. So be careful, be calm during the competition, read the question and think about it before going to the code and believe me if you follow it you can solve very fast.

🎯 2. Use pen paper

🤔 Cp is all about observation

Many times what we did is that we avoid using pen and paper and try to keep things in mind, in some questions it works but in many questions it results in wrong effort. So always use pen and paper (or any online sketch board) and note down all the dots, breakpoints etc.

🎯 3. Always think out of box

This is a common mistake, I have also done it many times. Sometime the question seems very simple, approachable to you and what we did, we run straight to the code without thinking anything and in that we get stuck. We miss corner cases and try wrong results.

🎯 4. Don’t quit and don’t stay at single approach

Sometimes you will fail too many times, give many wrong attempts, get demotivated because the same question is solved by your friend (who has low rating) or even your junior, but never give up.

Keep your mind calm, drink some water and come up with new energy, new perspective, new code.

🎯 5. Find mistakes from every unsolved and attempted question

This was once told to me by my senior. Whenever you get a wrong submission or you have difficulty understanding the question, try to indicate what is difficult for you. Note it down and think about it in your spare time. You’ll laugh at that the next time you encounter

🎯 6. Practice question related to that mistakes

Practice on mistakes which you find in previous tips (tips 5)

🎯 7. Learn new topic

Explore new topic so that you have wide knowledge.

🎯 8. Think like a problem of life, not a programming problem

What happens is that, when we read a problem statement and don’t get an idea of ​​the problem to be solved, we always try to figure out which algorithm should I use like graph, dp, binary search, two pointer or Must be using something else. We try to force different algorithms to solve it and in this we stray from the main part.

Instead try to link it to the real problem. Sometimes it can be analogous to a game, a logical experiment, now think how you will solve it if you play that game, what would be your strategy. Find that logic and now implement it and improve complexity (if require).

Let’s take a look at this problem.

This problem is similar to the game we play in childhood in which blocks of different sizes fall from the top and you have only one type of move (change the column of blocks using the buttons). Now think like you are playing the game and then find the scenario. I am sure that with this method you will never miss any edge cases.

🎯 9. Make some good friends

I personally think that this one is most powerful tip. you will learn more, grow more, practice more, discuss more when you will do (anything) in a group. Will never let this demotivate you because In any tough times you have someone who inspires you, who inspires you to start everything in a new way.

Thanks for reading

If you like the content give it a clap, follow me here to learn algorithm, discuss programming concept.

I explore each and every point in this video in hindi. Do check it out.

--

--