You are on page 1of 1

How should I start competitive programming from scratch?

Nikhil Meena, B.Tech Civil Engineering, Indian Institute of Technology Varanasi (2018)
Answered Aug 16

“From scratch”:

1. Do a DS-Algo course. I did this famous one on Coursera: Algorithms, Part I | Coursera ,
both part I and II. This will give you a really solid base. If you feel that you have a good
grasp on these concepts already, move to step 2.
2. Start practicing on online judges. Hackerrank is really good for complete beginners.
Solve the problems in the Algo, DS category, go through editorials even if you manage to
solve it. If you get the feeling that this is too easy, go to SPOJ. Sort the problems by
maximum submissions in descending order. Set a goal of solving 200 problems in this
order. This is the best practice with maximum learning in minimum time.
3. At any point of time, if you feel that the concepts are too hard, head over to Hackerearth.
This site has the best tutorials that read like class notes. I have found it really helpful,
both for revising as well as learning new concepts.
4. Participate in contests. It does not matter if you feel that you aren’t ready. Take part in
whatever contest is coming up, be it on CodeChef, Hackerrank, HackerEarth, Codeforces,
TopCoder, etc. It’s important that you get a really strong feel of this early on. This can be
done alongside all the practice and learning. Read the editorials, discussions, no matter
whether you are able to solve the problems or not. There is always a chance that you will
learn something new.
5. Keep doing this regularly. Try to solve atleast one problem every day, if you try to start
after a few days gap, you lose that edge.

Programming language: Most common is C++, thanks to STL. Java is good too, but if you
haven’t learnt either, C++ would be a better choice, I think.

Books: If you really feel the need for a book, I would recommend Competitive Programming 3.
It’s pretty good and there are a ton of problems. But I would reserve this for after you have
completed the DS-Algo course and gone through the practice sections for the same on
Hackerrank or SPOJ.

All the best!

You might also like