Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to Get Started with Competitive Programming?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

If you’re a Computer Science student or a coding enthusiast, chances are more you’ve heard individuals discussing their Competitive Programming skills and rankings & achievements in various coding challenges or contests. And truly, Competitive Programming skill is one of those few skills that set you apart from the crowd, add more value to your resume, and subsequently provide you with an edge over others during placements or other career opportunities. You need to know that many renowned tech giants including Facebook, Google, Amazon, etc. significantly consider the competitive programming skills of the candidates and even recruit the candidates through various competitive programming contests.


So, what is Competitive Programming…??

Competitive Programming is an exercise to level up your Programming and Data Structures & Algorithms skills via solving numerous real-world programming problems under certain crucial constraints including time limit, memory constraints, time & space complexity,  etc. You need to come up with an optimized solution within the time limit for the given programming problem in your preferred language and your code must pass all the required test cases. The best part is here you compete with various brilliant minds all across the world and enhance not only your programming or DSA skills but also other skills like logical and analytical thinking, problem-solving, time management, breaking a problem into small chunks, and many others.  

Now, this is something that many of you would’ve already known despite not being a competitive programmer – but the problem with most individuals, especially college students or beginner-level programmers, is they don’t know the right and effective path of getting started with Competitive Programming. So, with a similar concern, in this article, we are going to discuss the ideal strategical approaches that can surely help you to get started with competitive programming conveniently.

Let’s get started:

1. Learn the Preferred Programming Language

First and foremost what you need to do is pick out your preferred programming language and become proficient with its syntax, fundamentals, and implementation. You need to make yourself familiar with built-in functions, conditional statements, loops, etc. along with the required advanced concepts such as STL library in C++ or Big Integers in Java. There are various languages out there that are suitable for Competitive Programming such as C, C++, Java, Python, and many more – however, C++ is usually preferred more for competitive programming by the individuals mostly due to its faster time of execution, still, you can opt for any of the relevant languages as per your preference and convenience.  

You can easily learn and get command over the targeted programming language via using various standard online resources available over the web.

2. Learn Data Structures & Algorithms  

Then, here comes the core aspect of Competitive Programming i.e., Data Structures & Algorithms. Indeed, learning the DSA fundamentals is a must to start your journey of becoming a Competitive Programmer.  

What you need to know – you’ll be suggested by some individuals that it is not necessary to learn DSA priorly for getting started with CP and it can be done along the way however, we recommended you to at least cover the DSA fundamentals like Array, Linked List, Stack, Queue, Tree, Searching, Sorting, Time and Space Complexity, etc. before starting to solve problems and doing competitive problems as it’ll help you to feel confident and solve a majority of the problems. Without knowing Data Structures & Algorithms well, you won’t be able to come up with an optimized, efficient, and ideal solution for the given programming problem.

To learn and master Data Structures and Algorithms, you all are strongly recommended to visit GeeksforGeeks as there you’ll find adequate quality resources such as free tutorials, most affordable online courses, live classes, and much more.  

3. Start Practicing and Solving Problems

Now, what…?? Okay, so after learning the programming language and DSA concepts – it’s time to practice your learnings and start solving problems. You can opt for any standard platform to start practicing such as GeeksforGeeks, etc. If we particularly talk about GFG, it is very much recommended, especially to beginners, due to its easy-to-use interface, a huge set of problems in an organized manner, various difficulty levels as per candidates’ preference, powerful inbuilt IDE, etc.

You should start solving beginner-level problems first and initially, you’ll find yourself struggling with solving even these easy or beginner problems but there’s nothing to worry about it. You do not need to give up and keep trying. For instance, you can go through other individuals’ solutions or editorials but that should only be done after putting in the best efforts from your side.  

4. Start Participating in Coding Challenges or Contests

Moving further, after practicing adequate questions, now you’re ready to assess, validate, or showcase your competitive programming skills via taking part in various renowned coding contests. Undoubtedly, there can’t be a better way to become a great competitive programmer other than actually participating in these coding challenges or contests as much as possible.

There are various platforms that organize these programming challenges regularly such as Codeforces, GeeksforGeeks, CodeChef, HackerRank, etc. These platforms conduct numerous coding challenges on a weekly or monthly basis and here you’re required to compete with numerous other competitive programmers sitting all across the world. You need to solve the given problem with an optimal solution and that too, in the specified time duration. Also, one of the best strategies that you must remember is that once the challenge gets over, try to solve those problems again (or go through the editorials/solutions) that you were failed to solve during the challenge

5. Stay Consistent with the Process – LEARN, PRACTICE, PARTICIPATE!

One of the most important things to remember that is often ignored by most individuals is staying consistent with the process of learning, practicing, and participating. Yes, you need to know that it is a continuous process, and to master competitive programming – you’re required to keep learning, keep practicing, and keep participating. You need to get out of your comfort zone and expand your limits. For instance, after becoming proficient with basic DSA concepts – move to advanced DSA or after having mastery in solving beginner-level problems – switch to intermediate-level and further on, expert-level problems.

Also, despite coming up with the right solution, do check out others’ codes as well to learn to find various other new ways of solving the particular problem. Similarly, even if you’re failing or not being able to perform well in the coding challenges – you should stick to your aim and keep participating in these challenges by consistently rectifying your previous weaknesses or mistakes.  

So, these above-mentioned steps can help all the newbies and students (who’re having zero experience of CP) to get started with competitive programming quite smoothly and efficiently. Also, do remember the following points in the journey of getting started with competitive programming:

  • Build connections with fellow competitive programmers’ all across the world by staying active in several standard competitive programming communities or discussion forums as it will help you a lot to learn and grow as a competitive programmer.
  • Do not directly jump to solve the complex problems instead start with solving easy problems first and then gradually move towards advanced ones.  
  • Before start solving the problem, read the problem statement thoroughly for getting the right interpretation of the problem and thus coming up with the right solution. Also, some of the major details, for the correct approach to solve the particular problem, are usually hidden in the problem statement itself.  
  • Always keep in mind the Time and Space Complexity factor while solving a problem.
  • Don’t get discouraged or demotivated due to initial failures, instead take them as learnings to improve yourself constantly.  

Again, along with programming and DSA skills, Competitive Programming is much more about dedication, patience, and consistency. Also, to know about how to read or approach a Competitive Programming problem, you can visit the following links:  

So, what are you thinking now…?? Go and gear up yourself with the required skills and start your Competitive Programming journey ASAP!!  

The biggest mistake programmers make is probably getting discouraged and not practicing enough. Or practicing only on problems they feel they’re good at.
– Derek Kisman, aka SnapDragon

Related Courses

Competitive Programming – Live Course

We often ask ourselves, how do we start with competitive programming? Which languages are best for competitive programming? Well, here you go! Get in-depth knowledge of data structures and algorithms, practice with intensive coding problems, and learn efficient implementation of mathematical algorithms. Excel in programming and SDE interviews with our Competitive Programming – Live Course and become a better programmer.

My Personal Notes arrow_drop_up
Last Updated : 12 Jan, 2023
Like Article
Save Article
Similar Reads
Related Tutorials