Prerequisites for competitive programming

I am going to be entering the first semester of my college. I have learned c++ in high school. I tried to do the “Easy” practice problems, I am facing difficulty in solving them. Any help?

4 Likes

Get a book, say Balaguruswamy and understand all topics of C++. To understand them better, solve solved questions of the book and unsolved ones as well.

Then come on this site, select easy questions, sort questions by maximum number of submissions and start solving them one-by-one.

If you are unable to solve a problem, there can be multiple reasons why:

  1. You don’t know which concept to use. If you don’t know what arrays are, then you cannot solve questions involving strings. So figure out which concept to apply or which topic you must know to solve, then understand that concept and then come back to the problem.

  2. The problem is beyond your knowledge. Its very much possible. You cannot attempt to solve questions which require different algorithms without knowing algorithms. Get a book on algorithms, say CLRS, start understanding them and start practising them, then come back to the problem.

  3. Lack of experience. Lets say you know what arrays are, but how will you know that you need to use concepts of arrays if you don’t have enough understanding of arrays? And how do you develop understanding? By practising. Solve as many questions as you can because that’s how we gain experience in coding (and probably everything).

Some tips:
-Always keep a notebook and pencil while coding.
-Make sure you know why you have written this specific step.
-Always and always dry run your code.
-When you can’t solve a problem, even after HOURS of trying, then find the solution online or talk to someone about you who is better and more experienced than you. Don’t let your ego not discuss your problems with others. Always remain a student.

Happy Coding :slight_smile:

7 Likes

Follow this:

If that’s too overwhelming try hackerrank.

1 Like

Learn basic c or c++ and then do competitive regularly for one year. You will master DSA and language as well.

1 Like

Try this :100: