top of page
Search

How do I improve in competitive programming?

  • Writer: Ayush Mahajan
    Ayush Mahajan
  • Sep 3, 2022
  • 3 min read

Updated: Sep 29, 2022



Disclaimer: This is my own opinion, I generally this advise to people I have mentored in past, and I am sharing this because if nothing this provides a little context on what to do in scenarios.


Competitive Programming is tougher to get started with than to continue with. We have to solve a hundred (even thousands) of questions to see a little bit of improvement. Of course, we will find those who are exceptions, but the majority have no other option than to solve a huge amount of questions and improve.


I was also in your shoes at one time as I asked for recommendations on how to practice in this Codeforces blog 4 years ago. I learned a lot, and especially re-learned a lot as well. Since then I have mentored many competitive programmers, who have improved a lot as well (I like to take a little credit 😛)


There are many questions that people generally ask me, I will try to answer them here

Which DSA should I learn next? What problem should I solve next.
  • DO NOT learn DSA without any reason. Learn it when required to solve a problem. Because otherwise, you will anyway forget about it.

  • The problems in which you are not stuck at all are of very little gain to you.

  • Always try to solve outside your comfort zone

This is what I advise generally

  • Go to codeforces

  • Go to problemset

  • On the right, set the filter for difficulty from 1000-1200

  • Start solving the problems

  • If you didn't have too much trouble in the last 3 of the 5 problems, then increase the difficulty limits by 100 ( like 1100 - 1300)

  • Give as many virtual contests and real contests as possible.

Generally, you have an approach to solving problems in a max of 30 minutes, because the contest itself is going to be 120 minutes long. If you do not have an approach, read the editorial. You might go for editorial earlier as well. The general thumb rule for me is 20 minutes but depends on how many ideas I have for the problem. But yeah, do not spend complete days on it unless you are solving live-long challenges.

I have solved hundreds of questions, I am unable to solve any question without looking at editorial

That is completely okay. This is the reason I advised virtual and live contests, you test your improvement there. In practice, you try to learn as much as possible. We practice outside our comfort zone to improve and push it further if things start to become easier.


But if you are still not improving in contests, then you need to answer this

  • Have you solved questions outside your difficulty range?

  • Have you solved enough questions (at least 50+)?

Kind of think of it like this - If you solve 100 questions of range 1400-1600 You will get quite good at range 1200-1400 and okayish at range 1400-1500

and may have trouble with 1600-rated questions


This mathematics is just what I used to in my competitive programming days. You can use your own when you develop experience in competitive programming.


I am unable to solve questions in contests or online assessments for placements but I can solve them in practice

There is a reason we advise giving virtual contests. In practice, you learn without any time limit on problems, and you need to get the ability to manage your skills to solve problems within the time limit.

You need to learn to solve with pressure on you.

You have to learn to solve questions under the pressure of a time limit. - Give Virtual Contests

You have to learn to solve questions under the pressure of time limits and rating changes - Give live contests

Then you will face contests (online assessments) which puts you under the pressure of grabbing a career opportunity as well.


So my advice would be to regularly participate in the Codeforces contests and give a lot of virtual contests as well.



 
 
 

Comments


bottom of page