Competitive Programming
You are here and why should you care?
Competitive Programming is a sport, I mean literally. Take any sport, let's consider cricket for that matter, you walk in to bat for the first time. Swing and a miss, do it couple of times and you'll eventually hit one over the ropes. Now, consider a programming contest as a game of cricket, metaphorically. Compile a code and submit, you may get a WA (Wrong Answer). Make changes to code and eventually you will get your first AC (Accepted/Correct Answer). Let me give you a sneak peek, about 20% of questions in a programming contest are simple conversion of plain english to a code of your favourite programming language. Well there are many perks of being a comptetive-programmer.
- Makes you a desirable candidate to major companies
- Makes you faster and more focused at programming
- Helps you solve complicated problems
- Teaches you how to work in teams
- You have fewer bugs in your code
- You're a faster coder
- Your debugging skills are top-notch
- You don't worry about implementation details

Let's dive deeper
One school of thought which is very popular and fairly simple to begin with is Competitive Programming. Getting started with it is quite easy and if one devotes sufficient amount of time and effort, you can develop a very strong grasp of programming logic in relatively short amount of time.
Here are some steps to get started and be good at it-
- Get comfortable writing code in either of one of these languages C, C++ or Java. Why only C, C++ or Java? Because these are the standard languages allowed in any programming competition.
- If you are already good at C, it is suggested to learn C++. It is the most popular language among competitive programmers because of its speed and an excellent library in the form of STL (Standard Template Library).
- Pick an online judge. Recommended ones are Topcoder and Codeforces or Codechef. These sites have high quality of problems and also allow you to see other's code post contest completion. These also categorize problems based on the topic. Some other popular judges include SPOJ, CodeChef (powered by SPOJ) and HackerEarth.
- To begin with, start with simple problems that typically require transforming English to code and does not require any knowledge on algorithms. Solving Div 2 250 (Division 2, 250 points) in Topcoder or Div 2 Problem A in Codeforces is a good start.
Many programmers argue that the problems in competitive programming do not relate to the real life programming work. For the most part, it is true. Then why do we do it? Because it makes you a better programmer. How?
- Time limit always makes you write time efficient solutions.
- Critical test data helps you write correct solutions, in one go!
- Further it makes you great at debugging code.
- Hard problems makes you break down the problem into chunks, solve them individually and bring it all together to solve the main problem.
Yes, competitive programming is not the only way to master these qualities but it is one of the best ways to do so. Give it a shot, if you enjoy it, it's worth it. You will be rewarded with objective benefits. If you don't, even after repeated trials, give yourself a break.
Want to move on to next stage?
[Suggested Reads and Videos]
- The Complete Reference to Competitive Programming [5Min Read]
- Getting started with the sport of competitive programming -HackerEarth [10Min Read]
- Learn Competitive Programming -CodeChef
- What was Anudeep Nekkanti's Competitive Programming strategy to become 35th in Global ranking, in just 6-7 months? [3Min Read]
- How much time should anyone spend for competitive programming, open source contributions, and learning via MOOCs every day? [3Min Read]
p.s - This article is a curation of different sources regarding Competetive Programming. Thankyou hackerearth, codechef, quora and all the other sources for the information regarding Competetive Programming and relevant topics.