A Beginner Friendly Guide To Competitive Programming

29 August 2020

Image Source: Codingblocks.com

Programming is mostly about fun and competitive programming takes this fun to another level where it become a challenge to compete with the best and solve complex problems and showcase our talent.

The hardest and most important step in any field is getting started i.e taking first steps and same goes true for competitive programming. For beginners it becomes really confusing to learn about so many different terms e.g. dynamic programming, backtracking, greedy approach and many more , specially when we know only about arrays, queues , stacks.

So in this article we will go through some key steps that will help in getting started with competitive programming.

1. Where to start ??

This is the most significant part of our challenging journey into the world of competitive programming. We can start by building a basic understanding of commonly used data structures and getting familiar with them in and out. Data structures play an important part in solving any problem that we might tackle in the world of competitive programming.

Here is just a brief list if commonly used data structures that every beginner should get hands on into.

These data structures will give an edge while solving any complex and help us focusing on the main problem rather than focusing on how to deal with trivial components.

2. What language to choose ??

Best programming language is another topic of long debate and personal opinion, the language we code daily and have good command over it automatically becomes our favorite and best language for us.

For competitive programming we should have at least two languages.

Primary language that we are most comfortable in and takes less coding time and comes with modern API and framework, e.g. 

Secondary language in case if any of our primary language is not present on the platform where we are competing, it may happen because these are modern languages and they give a competitive advantage in terns of coding time, so in this case we can switch back to our secondary language that most of the times will be available in all platforms e.g

Again most people argue that machine native languages such as C, C++ are faster than interpreted languages such as Python, Rust and are good for competitive programming, yes that is true that C++ is faster than Python but its also proven then no implementation of O(n^2) solution in C++ can be faster that O(n) solution implemented in Python.

Therefore its all about creating better solution in time and space complexity than to worry about language performance.

3. Where to practice ??

After getting through basic study of data structures and mastering your favorite programming language now its time for practice because practice is all it takes to reach a level that no one has reached before. If Cristiano Rolando and Usain Bolt needs practice before every game even after reaching at top level and who are we to shy away from practice.

Here are some good platforms where we can practice our problem solving skills and be prepared for competitive programming.

These platforms provide enough challenges to improve our skills and practice for real competitions.

4. How to improve ??

Image Source: gfsantos.com

Plateau curve is the significant thing to consider while measuring our progress , because most of our journey will be spent on one or other plateau this is because once we improve ourselves we need to make more efforts to reach another plateau, so sometime we feel that we are not making any progress but in realty we are just preparing for our jump for next plateau, so don't be disappointed on this.

Regular practice makes us better daily and we should keep that in mind, never stop practicing otherwise we will become rusty, similar to the bodybuilders go to gym daily even after achieving their dream physique because it takes lot of efforts to be at that level , same way we should also practice regularly to keep our skills on top level.

Keep reading about new problems and new approaches to solve them and GeeksForGeeks is place to go for.

5. Tips to become better at competitive programming.