This post aims to show a path to those who are willing to get started with competitive programming or have just started it, but didn't find where and how to get started with it and left in between. And also to those students who are still wondering how we practice it.
[Note: Whatever written here are totally my own experiences and thinking.]
What exactly is Competitive Programming?
Competitive Programming or CP is actually a mind game where each individual competes with others solving the same problem within a time frame using their skillsets and logical thinking keeping an eye on the given constraints.
Well! All these theoretical "Gyan" are good to know but don't help us in understanding it fully. Everyone keeps on telling "Practice, Practice, and Practice!", but as a beginner, we wonder what and how should I practice?
So to get started there are some basic steps that are easy to follow:
The first and foremost thing is to learn a programming language. The way you need to learn a language for communication with peeps out there, same way you need to learn a programming language so that you can express your logical thinking to your device. You could choose any language of your choice including C, C++, Java, Python, or any other.
According to Wikipedia, there exist 700+ programming languages in the world! So, which one is best for me? And believe me, it's not an easy task to choose from where you should begin!
It's a fact that if you know one language then you can easily switch to others. So you don't need to learn all of them. But still, which one is meant for me?
You need to be careful that whichever programming language you choose that must be able to implement Object-Oriented Programming (OOP) like C++, JAVA, Python, etc. The reason behind this is that it is required by the industries.
In my opinion, you can go ahead with anyone among C++, Java, or python. But my personal favorite is C++.
So now you have your language. Now where to get started?
As per my experience, if you are a beginner, I would suggest you get started with Hackerrank as it is beginner-friendly and it has got a very good IDE and user interface. It also has problems starting from beginner level and you can also practice language-specific problems. Along with it you can also code on HackerEarth parallelly. And after practicing for about 3 to 4 months you can switch to other platforms like Codechef, AtCoder, Codeforces, Spoj, and many more out there.
I Don't know DSA, Should I Start with CP?
Now there is a myth that you can only start with CP once you are a pro in Data Structures and Algorithms and have a strong command of languages too. Well, this is not true. Always believe in Learn while you Code. I am not saying that DSA is not at all important for CP. All I am saying is that you can start with CP even if you know some of the basics of arrays and some basic syntax of coding in a language.
All the pro coders out there was once noob. And believe me, they too went through the same state of mind through which you are going through now. All you need to do is to take your first step and just start with it.
How I started my coding journey?
Well, I won't go into detail now, I will try to write a separate blog for that. Briefly, I got started with Hackerrank, solved around 250 questions. Switched to Codechef and again practiced around 100 practice questions. And after that participated in my first contest on Codechef.
Now again I am not saying you practice these many questions and then give contests. It all depends on you. Whenever you feel confident enough to give contests you are free to attempt it. Just have patience and code!
For learning any concept just visit geeks for geeks. Learn the concept and apply them. Start with beginner-friendly problems and slowly try your hands on more difficult problems and meanwhile start with DSA too.
How to keep the pace?
Well, the key is to practice every day. Make a routine of practicing some questions every day. Always keep yourself motivated to solve the problem. If possible, practice peer-programming (coding in pairs) and try to surround yourself with like-minded people, people who code.
Failures!
Failing is a part of life. You learn when you fail. So don't fear failing just keep on trying, learn the required concepts and try again. Try until you convert WA or TLE to AC.
So start your journey now! And join the most awesome sport of your life!
Follow me here:
Very helpful blog 👍
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteNice post.
ReplyDeleteWell written brother.
ReplyDeletei am feeling motivated bro
ReplyDeletewell explained ankit !!
ReplyDeleteGood Content.
ReplyDelete