How to get started with competitive programming

Firdaus Jawed
3 min readSep 30, 2021

Competitive programming involves programmers competing against each other to solve programming questions in a limited amount of time. It is a mind sport for solving coding problems using algorithms and data structure.

Step - 1: Choose the language

It is the most basic and most important step. You can do competitive programming in any programming language but it is highly recommended that you choose one of C++ or Java. I will highly recommend C++ because in competitive programming the most important thing is timing and C++ is a very fast language as compared to java and C and it contains STL as well.

Step - 2: Practice

As per my personal experience if you are a beginner I will recommend everyone to start with HackerRank. You might get stuck after first 4-5 questions and that’s normal. In that case, feel free to see the editorial or google to look for the solution. When you find it, make sure to understand it, and then code it on your own.

when you are done with basics of the language, then start practicing it on higher level platforms. some of them I have listed below:

  • CodeChef
  • Codeforce
  • Hackerearth
  • TopCoder
  • Coderbyte
  • Codewars

Step- 3: Master Data Structure

I am not saying that you have to master each and every topic of DS, but there are some hot topics of DS that are very common in competitive programming. are something that helps you in making the program more efficient. Having good amount of knowledge in Data Structures will help you in selecting the optimal Data Structure for any problem.

I will suggest to learn Data Structures from GeeksForGeeks, it contains Data Structures tutorials and problems in rich amount.

Step- 4: Mastering Algorithms:

It is most important to know about algorithms, because after mastering it you will know a lot of approaches to solve a single question, which will save a lot of time and only after you will become a pro programmer. So, knowing all algorithms like binary search, quick sort, merge sort, dynamic programming, recursion, bit manipulation etc, is definitely going to give you a high kick in the rank as a pro programmer.

Step- 5: Practice, practice and practice

It might be the most common suggestion but honestly, it is key for mastering in the competitive programming. You need to practice a lot, practice from hackerrank, hackerearth and codechef. And for DS and algo part you can even try Leetcode, InterviewBit etc. Apart from this you need to practice from GFG and try 450 questions from LOVE BUBBER.

Summary:

This is the summary for this blog.

  • It’s vital that you select a programming language which you are most comfortable with
  • Sign up on any online coding challenge website and start solving their practice problems
  • You need to learn about Data Structures which is vital to solving complex coding issues.
  • You need to understand the concept of complexity in programs.
  • Learn important programming patterns like recursion, Dynamic Programming, etc.

Hope this will help you.

Happy coding!!

--

--

Firdaus Jawed

Final year student at National Institute of technology Patna || Guardian @ Leetcode(2222) || competitive programmer