What Is Competitive Programming and how does it work?
Tags: competitiveprogramming, programming, codenewbie, algorithms
Published: 2023-01-17 09:30:42

## Competing with code
Competitive coding is a way for computer programmers to test and improve their skills by solving challenging problems on time in competition with others. These contests are usually held online except for some final rounds that are held on-site, such as **IOC**, **ICPC**, **Google Code jam**, and **Meta (Facebook) hacker cup**.

There are some prizes involved, but in general, they are small and you are very unlikely to be good enough to make it worthwhile for the prizes alone (sorry). In other words; if you score a t-shirt, you are probably among the absolute top programmers in your company.

## So why should I do competitive programming then?

First and foremost **competitive programming is a lot of fun**.  Just like some people can’t get enough of crosswords and sudokus, solving programming problems gives a very rewarding kick. Think of it like the **feeling** when your **unit test finally turns green** after days spent on bug fixes - but on steroids. A good way to balance all the dull responsibilities you have in your professional programmer daily work..

Participating in coding competitions can also be a great way to [connect with other like-minded programmers](https://www.competitivecoders.com) who share your passion for programming.

Then of course another benefit of competitive coding is that you become a better programmer or you can learn to code in a programming language you don't already know. It requires you to think logically and systematically under high time pressure (not completely unlike when production is down), which of course helps you develop stronger and faster problem-solving skills. 

Competitive programming is also a fun way of digging deeper into (and having use of?) **data structures, algorithms, and programming languages**. The core skills of a programmer so to say, regardless of what frameworks and languages are the current shiniest toys in the field. Sure, you know how to sort a list in Python; but do you know how to do it in O(1) time? Or using a heap? Without googling?

## Which are the major and most important coding competitions?

This is of course a question of opinion, but there are a select few that seem to be more popular than others. (and way too many smaller ones to avoid feeling overwhelmed)

1. [Google Code Jam](https://codingcompetitions.withgoogle.com/codejam): This is one of the most prestigious competitive programming competitions in the world. It is organized by Google and attracts top programmers from around the globe. The competition features a series of algorithmic challenges that test your problem-solving skills and you must score above a certain level to advance from each round.
2. [Meta Hacker Cup](https://www.facebook.com/codingcompetitions/hacker-cup/)(formerly known as Facebook hacker cup): This is a yearly competitive programming competition organized by Meta. It features a series of algorithmic challenges and is open to programmers of all skill levels. In Meta Hacker cup you can truly use any programming language you like, since you run the code on your own machine and only submit the results.
3. [Advent of code](https://www.adventofcode.com): Probably the most loved programming competition. Every day in December until Christmas, a new problem following an intricate storyline is released. Advent of code might have the strongest and most friendly and engaged community of all the coding contests - and the challenges is nothing less than a piece of art.
4. [Google KickStart](https://codingcompetitions.withgoogle.com/kickstart): This is a series of competitive coding contest rounds (independent of each other) organized by Google. It's designed to help developers improve their problem-solving skills, advance their careers and sharpen for Google Code Jam. 

Then there are two contests (with supporting feeder contests) that are the most considered to be the “world cup” of programming competitions, but they’re not open to everyone

1. IOI, The International Olympiad in Informatics: This is an annual competitive programming competition for secondary school students - [https://ioinformatics.org/](https://ioinformatics.org/)
2. ICPC - International Collegiate Programming Contest: This is an annual competitive programming competition among teams of undergraduate and graduate students. The contest is organized by the Association for Computing Machinery (ACM) and is typically held at various universities around the world. [https://icpc.global/](https://icpc.global/)

## How do I start with competitive programming?

If you're interested in getting started with competitive coding, here are some steps you can follow:

1. Pick the programming language you are most comfortable with. Any of the popular programming languages will do. Even though the top competitive programmers usually use C++ for its superior performance and standard library functions, it will take a long time before the language performance is your main problem. **So start with Python, Java, C#, or whatever you already know** (just make sure the language is supported by the competitive programming platform you want to use).  

Personally, I prefer **Python**, competitive coding is very similar to prototyping, and what might be the downside of Python in large projects maintained by teams - it is what makes it superior in competitive programming. Crunching out hacky solutions fast. **Focus on the problems - not the language.**

2. Practice solving problems: Go to the archives of Google Code Jam, Google Kick start or Meta Hacker cup and start solving problems. This way you get familiar with how the coding competitions work and how to read the problems. Start with the easier ones, preferably with the qualification rounds - it will probably be harder than you think. (Even though you are a senior 1337 master developer that has been coding since the invention of assembler.)

To practice solving problems on time; many websites offer coding contests more often, such as **Leetcode**, **Code forces**, **CodeChef**, and many others. Solving these problems can help you develop your problem-solving skills under time preassure and prepare you for the larger and more important competitive programming competitions.

3. Team up with others and learn from each other’s (and the top in the field!). Join the CompetitiveCoders.com Discord, and [see how others solved the Programming competitions](https://www.competitivecoders.com/ProgrammingCompetitions) you participated in.


## Do I need a computer science degree?
Although it of course helps to have a degree in Computer science and engineering, Informatics or similar, competitive programming can be a perfect way to fill in your knowledge gaps - the fun way! So don't let a missing degree stop you, to be honest we who have computer science degrees don't remember our Algorithms & Data structures 101 course anyway.

### TL;DR summary: 
1. Pick the programming language you already know and start competing! 
2. Go to the competitivecoders.com [programming competition calendar](https://www.competitivecoders.com/calendar) and join the next one. 
3. Just do it and take it from there.