When starting with competitive programming, we start off by really getting motivated about studying different algorithms, solving problems and participating in contests but gradually lose motivation with time and stop practicing. If this has happened to you, you are not alone. This has happened with every one of us, and the same happened to me when I started competitive programming.
This is entirely natural and expected if you practice the wrong way or have too many expectations in the beginning. In this article, we will talk discuss some actionable tips which you can follow to make sure that your motivation levels are super-high.
Fix your goal and decide why you want to do competitive programming. After fixing your goal, you should decide on a realistic timeline for your goals and track your performance improvement against that timeline. For example, your goal, along with timelines, could be any of the following:
Even though you may be tempted to do so, don’t skip this step. This step is super important because of multiple reasons:
Depending on your current level, and the strategy you follow and your natural aptitude at problem-solving, you may or not notice immediate improvements within the first few days.
Even if you have excellent problem-solving skills, some goals are inherently hard to achieve and take consistent efforts every day. If your goal is to become red on Codeforces and have just started programming, then don’t think that you can achieve that with only 2 months of practice.
If you set your expectations right at the beginning itself, then competitive programming will stop becoming frustrating, and you will not lose your motivation.
raining for competitive programming is like training for any other sports. Quality of your training matters much more than your quantity of training. I see that many people advise to solve problems in decreasing order of difficulty on multiple judges and keep on practicing until you have finished a substantial amount of problems. Practicing this way is plain stupid!
Practicing this way is the fastest way to lose motivation! You will be just practicing a few problems every day without improving your skill or speed.
If you have 1+ month of preparation time, then it is best to do two things:
Study Algorithms from reliable sources: CLRS Book or good quality editorials on TopCoder/HackerEarth. After reading the topic, try to solve a few “easy/standard” problems on these topics. For example, if you have studied Binary Search, then try to solve a few problems on BinarySearch.
Take Part In Programming Contests: Regularly take part in competitive programming contests being held on websites like Codechef, Codeforces etc. Regularly take part in only short contests and skip the long contests. Regular participation in short contests would help you in improving both your speed of solving a new problem and coding the solution in a short period. Both skills are critical to success in coding contests as well as interviews.
Upsolve problems after the contest: After the contest is over, the problems of the contest can be categorized into three categories:
If you follow this strategy for even 3 weeks, I can guarantee that you will notice a drastic improvement in your problem-solving skills and speed of coding. Most importantly, competitive coding will become fun for you and you will not lose motivation.