Beginners Guide To The World of Competitive Programming

Vijay kumar kaushik
Techspace
Published in
3 min readAug 24, 2019

Competitive Programming

The core directive in ‘Competitive Programming’ is this: “Given well-known Computer Science (CS) problems, solve them as quickly as possible!”.

Let’s digest the terms one by one. The term ‘well-known CS problems’ implies that in competitive programming, we are dealing with solved CS problems and not research problems (where the solutions are still unknown). Some people (at least the problem author) have definitely solved these problems before. To ‘solve them’ implies that we must push our CS knowledge to a certain required level so that we can produce working code that can solve these problems too — at least in terms of getting the same output as the problem author using the problem author’s secret test data within the stipulated time limit. The need to solve the problem ‘as quickly as possible’ is where the competitive element lies — speed is a very natural goal in human behavior.

Photo by Braden Collum on Unsplash

From where to Start?

Step 1:

Choose a programming language and learn their basics so that you can use that language to write error free code. So next question pop up is “Which language to learn?”. For the Competitive world speed and useful handy tools matters a lot, hence C++ is the best option that we have . C++ is extremely fast and Standard template library of c++ provides many tools that helps in writing fast and efficient code. Although C is faster than C++ but due to absence of STL library C++ is preferred.

Resources:

For C/C++ :- http://www.youtube.com/mycodeschool

For Practice :- https://www.hackerrank.com/domains/cpp

Step 2:

When you learn a language you know how to code a certain thing . But how to take inputs and process it to give output you need to learn Data Structures and Algorithms. Data Structure will teach you how to store the input for a given problem to access data efficiently and knowledge of algorithms helps you think better and faster solutions. As Competitive programming is all about correct and faster solutions , then this subject is helps to do better at real competitive contests.

Resources:

For Practice :- https://www.hackerearth.com/practice/codemonk

For Reading :- https://ms.sapientia.ro/~kasa/Algorithms_3rd.pdf (This books contain all the basic Data Structures and Algorthim if you can read it fully thats better , else you can also use it as a reference)

Video Lectures :- http://www.youtube.com/playlist?list=PL2_aWCzGMAwLZp6LMUKI3cc7pgGsasm2_

Step 3:

The most important part for being a good Competitive Coder you need to practice a lot. There are some Websites (which are known as online judges) which provide you a platform to compete with other coders from all over the world such as CodeChef, CodeForces etc. Sign up on these platforms and start practising and compete. A tip for this step is that Competitive takes time and check patience level , so just keep doing it after a certain level result will starts to come surely.

Other Helpful Resources:

For all kind of content to learn about algorithms and data structures:- http://geeksforgeeks.org/

For topic wise content and practice problems:-https://discuss.codechef.com/t/data-structures-and-algorithms/6599

For Advanced topics :- https://codeforces.com/blog/entry/57282

--

--