Introduction to Competitive Coding

Many times we have heard about the phrase competitive programming, competitive coding or sport programming , but what exactly does it mean?

In hindsight, Competitive programming is an art form. It’s creative problem-solving at its finest, a combination of hard analytical thinking and creativity.

It is the usage of data structures and algorithms to solve logical problems, in the shortest and most efficient way possible.

Without further waiting, let’s dive into the mind-boggling rush of adrenaline induced by competitive coding!

How to get started in your Competitive Coding Journey?

The first thing to pick up on this journey is a programming language.

Most people prefer to code in C++ or Java, due to the huge inbuilt libraries that make it an attractive option for applying data structures and algorithms.

Any language is good, as long as you can write short and efficient code.

C++ is by far the most popular programming language for competitive programmers. It offers a library called STL (Standard Template Library). STL is a collection of C++ template classes that provides common data structures and functions.

C++ is followed by other languages like Java, an Object Oriented Programming language. Java offers extensive libraries for data structures called Collections. Still, it’s a bit slower than C++, which is a downside.

Another popular language in competition programming is Python because of its user-friendly functionality, as the code is significantly shorter and more concise than other programming languages. The downside to using Python is that it is quite slow compared to C/C++ and Java.

Where to take part in competitive coding?

The contests you should take part in for this strategy depends on your level.

The difference between beginners and experienced is usually the difficulty of problems , usually having a specific DSA background.

Most platforms follow Divisions :

Division 2/3 — mostly for new-comers and amateurs.

Division 1 — for experienced veterans of CP.

For Beginners(Codechef/Codeforces >1600)

  • Codechef Long Contests and Cook offs
  • Codeforces Contests (all of them)
  • Atcoder Beginner Contests

For Experienced (1600+ on Codeforces)-

  • Atcoder Contests (all of them)
  • Codechef Cook offs
  • Codeforces Contests (all of them)
  • You can participate virtually on Codeforces in case there is no online contest.

Resources :

Algorithms and Data Structures Literature and Courses

For programming interviews as well as competitive programming, you would need to have a solid grasp of the various common algorithms and data structures, algorithm design paradigms, and the ability to analyze algorithms.

For text, Introduction to Algorithms, this is a great book for theory, exercises, and problems, and covers most of the stuff you’re going to need.

For courses, I’d recommend the following:

Problem Solving Literature

Apart from having knowledge about various algorithms and data structures, you’d also need to develop a really strong problem solving ability. Problems such as those that appear in Olympiads really help with it. Some of the texts I’d recommend for this are:

Online Judges and Competitions

Here is a list of some competitions that you can participate in. You’ll learn by solving new problems, looking at other participant’s code, as well as reading editorials to learn multiple solutions to these problems.

  • Google CodeJam — The competition happens annually. There are several rounds (Qualification, Round 1, Round 2, Round 3, and World Finals) and the top 25 contestants for the World Finals Round are brought onsite, and the winner gets prize money of 15,000$. The top finishers are usually reached out for a potential job opportunity. Problems that have appeared before are available on the website with solutions, and input and output files.
  • Facebook HackerCup — Another annual worldwide programming competition with multiple rounds. The winner gets prize money of 10,000$. Just as with CodeJam, the top finishers are reached out for a potential job opportunity. You should be able to find the problems that have appeared before on the website.
  • ACM ICPC (International Collegiate Programming Contest) — An annual programming competition for university students. Participation is in teams of three. There are multiple rounds (online, regional onsite rounds, and World Finals). Universities world over host online and regional onsite competitions, and the winners from these advances to the World Finals. Previous problems are available on the website and are the best source for practice in preparing for this competition.
  • Codeforces — Codeforces Rounds are held almost every week, and many more competitions take place as well. You can practice solving problems that have appeared in previous Codeforces Rounds and other competitions.
  • TopCoder — TopCoder SRMs are held almost every week. And TopCoder Open is held once every year. You can also practice solving previous problems in the TopCoder Arena. In SRMs, there are two divisions; Division I and Division II. You start off by competing in Division II and if you do well, then you move up to Division I. There are 3 problems given each in Division I and II, and this is how I would roughly rank them in order of difficulty — Div II Level I < Div II Level II ~ Div I Level I < Div II Level III ~ Div I Level II < Div I Level III. There is also a section for Competitive Programming tutorials that I would highly recommend. The top finishers are usually reached out by sponsors (Google, Facebook, etc) for potential job opportunities. You can even use their forums to discuss the problems that you’re stuck on or to know about programming competitions that are happening around, and a lot more.
  • CodeChef — There is a really challenging 10 day long competition that happens once every month. There are also two shorter (2.5 to 3 hour long) contests that take place every month. There are also plenty of other competitions that take place on this platform that are usually organized by different entities.
  • Project Euler — As the website says, a series of challenging mathematical/computer science problems. Math lovers would really enjoy solving problems on this website.
  • HackerRank — Lots of programming competitions and problems are available on this website. And there are a lot more domains other than just algorithms.

Why should you do competitive coding?

  • Get noticed by recruiters by your performance on various competitive coding platforms
  • Helps you in learning DS.
  • Makes you prepared for coding rounds of interviews
  • Because of the adrenaline rush of 100% AC XD
  • Helps in Placement prep

In short, Competitive Coding is an amazing way to kick start your journey into the software development world. It’s a mixture of core computer science, problem solving and adrenaline rush, which will surely contribute to your growth as a software developer and an individual.

I’m Rachitt Shah, an ECE undergrad at VIT Pune. You can connect with on LinkedIn:

Thanks for reading, hope I helped you in some way!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store