Why Is Competitive Programming Important?
Tags: programming, competitive, advantages, importance
Published: 2021-01-07 23:19:32

To answer this question can be hard since not many people are interested in the subject, either by not knowing about it in the first place or seeing it as something that will drain a lot of time from them without actually giving them tools for everyday work and like those two reasons there are probably a thousand more you could bring up, I would suggest before you read this article to take a look at the concept of **[competitive programming](https://en.wikipedia.org/wiki/Competitive_programming)**, just in case you aren't familiar with this fascinating world. 

# *Improves upon your reading and understanding skills*

I am not just talking about reading fast, I am also talking about understanding what the text in front of you is trying to communicate, how to spot ambiguities, how to understand the problem, and abstract yourself off anything that could be unimportant to the final solution. This is really important in my opinion since sometimes requirements can be poorly written or poorly specified, also they can be 40 pages long and have only about 10 pages worth of useful information, the ability to pick the things that are actually important and separate them from the other stuff, is crucial for any programmer, especially when the requirements come from another company.

![Alt Text](https://images.ctfassets.net/u4vv676b8z52/4R0Sc2OUQp7xRbnOKcBoTF/634729f297dc14f9bac0fa6061c4b7d5/man-peers-at-laptop-1200x630.jpg?fm=jpg&q=80)

# *Teaches you the wonders of algorithmics and data structures*

Algorithms are what we as programmers do, however, there are so many algorithms and paradigms that you might have heard about but don't know much of, and are so fascinating, from the concepts of a **[Greedy algorithm](https://en.wikipedia.org/wiki/Greedy_algorithm)**. to **[Dynamic Programming](https://en.wikipedia.org/wiki/Dynamic_programming#:~:text=Dynamic%20programming%20is%20both%20a,from%20aerospace%20engineering%20to%20economics.)**, passing by **[Dijkstra's Algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)** and **[KMP](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm)**, or even some  **[Divide and Conquer algorithms](https://en.wikipedia.org/wiki/Divide-and-conquer_algorithm)**, going to things that you might never heard about but are actually very useful like **[Ford-Fulkerson's Algorithm](https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm)**, **[Modular Exponentiation](https://en.wikipedia.org/wiki/Modular_exponentiation)** and the **[Maximum Bipartite Matching](https://www.geeksforgeeks.org/maximum-bipartite-matching/)** concept. 

![Alt Text](https://rkpandey.com/AlgorithmHelper/assets/dijkstra1.png)

And of course, we cannot miss out on some Data Structures like **[Tries](https://en.wikipedia.org/wiki/Trie)**, **[Binary indexed trees](https://en.wikipedia.org/wiki/Fenwick_tree)** and **[Segment Trees](https://en.wikipedia.org/wiki/Segment_tree)**, just to name a few.

 I just named a few concepts and algorithms, but this list goes far and beyond, as programmers knowing this will help us understand how some things are done, how can be other methods to solve specific problems that don't need to be using brute force, and since we need to adapt a requirement to an algorithm or set of algorithms, it helps us to abstract ourselves and select the best solution for the current problem at hand, since all algorithms have their advantages and disadvantages.

![Alt Text](https://he-s3.s3.amazonaws.com/media/uploads/eec15d3.jpg)

# *You learn about the importance of execution time and memory management* 

Besides solving problems, we as programmers understand that a machine has finite resources, both a limited amount of memory to work with and a limited amount of instructions per second a processor can execute, in competitive programming usually there are very tight time limits and memory limits, a problem as simple as retrieving the n-th element of an array can be really challenging if the memory limit is low, and a problem as simple as finding pairs of elements can be quite challenging if the time limit is very strict. So in competitive programming is a must to understand the Big O notation for complexity, and also understand how to identify when something is gonna be too slow for a certain amount of entries, this way of seeing things can help a lot at the everyday work since we should be doing code optimization constantly, for example making a program that runs as fast as possible while consuming the less memory possible.

![Alt text](https://amitshahi.dev/static/756663638e3de206cc41988bfa13b7db/2d017/bigocomplexitychart.jpg)

# *Prepares you for coding interviews* 

Yes, knowing a language very well, a framework or other things is very important, actually, it can be paired up perfectly with all the advantages we talked about, but some companies, especially big ones like Google and Amazon, take special care to find out if you can solve these kinds of problems without using specific frameworks, for example, the most usual question that pops up in an Amazon interview is the BFS problem, which you would need to solve from scratch to approve said interview since most of the time they won't let you use a pre-made library. There are now tons of sites to practice these kinds of problems, and the reason being that they are pretty much a requirement to go work for the most notorious companies. 

![Alt text](https://miro.medium.com/max/2560/1*1KHGpzxpcFXkpbzkI_4Mog.jpeg)

# *And as a sort of conclusion...*

There are many more advantages from learning about the world of competitive programming, also there are, of course, some disadvantages, however, I can highly recommend if you have any interest to start doing some research and learn things you didn't know before, thanks for reading!.