What is Competitive Programming?
When I first Googled Competitive Programming, I got a wikipedia article describing it as a mind-sport where people programmed. That was pretty close to just saying “Programming that is Competitive” - which is obviously no use at all. Now that I’m more involved in it, I realize that lots of people confuse it with Hackathons, so here is really what is meant in the traditional sense by Competitive Programming:
Competitive Programming is the act of coding up solutions to Data Structures and Algorithms problems in a competitive, time constrained environment. The most well known such competition is ICPC (a 3 person team competition) but Google and Facebook also host CodeJam and HackerCup, respectively (which are both solo competitions).
1
2
3
4
What is Competitive Programming?
What are the benefits of dedicating your time to Competitive Programming?
What won't Competitive Programming help you with?
How do you get started with Competitive Programming?
Competitive Programming Benefits
Competitive Programming is all about solving problems related to Data Structures and Algorithms - practicing these things regularly will make you good at them. Which can be useful for:
- University Courses.
- Interview Prep (Particularly for massive companies like Microsoft, Amazon, Google and Facebook).
- Improving your logical reasoning / problem solving.
- Improving your ability to reason in a group setting / explain your reasoning to other people.
I’ll focus on the last two points and discuss the previous two later: something that many STEM fields have in common is the requirement for those who practice them to have a developed ability for logical reasoning and problem solving. In the context of Software Engineering, this supercedes just Data Structures and Algorithms and this is something that is often forgotten in the “Leetcode Grind”. In Competitive Programming, in contrast to Leetcode, there is seldom any “template-matching”, i.e. simply recognizing a template of problem and fitting your reasoning around that - yes, you build up a repository of past problems solved in your mind and will draw similarities to past problems when solving new ones, but your approach is not based on this (something I see regularly in people who grind Leetcode). Furthermore, in the case of ICPC, you’re going to be solving tough problems in a team of likely super smart people - you need to get used to explaining your logic to them, because they’ll probably not be too thrilled with you submitting a solution that you haven’t gotten their confidence in. In a nutshell, Competitive Programming forces you to look at new, strange problems and explain your solutions to them to your teammates regularly - both things you’ll need to do as a Software Engineer and/or Researcher.
Competitive Programming Limitations
I think the one issue with Competitive Programming is that people often approach only to do the first two goals I listed above. If this is your aim, I’d actually suggest against taking up Competitive Programming. Pragmatically speaking, your time is better spent in simply studying for your courses / taking up Leetcode / Cracking the Coding Interview - the algorithms that you’ll encounter for Competitive Programming are eventually too specific for your courses and interviews, and the ability to churn out code for them is likely not required for either of these things either.
That being said, Competitive Programming is a great way to accomplish these goals while having fun, if you find something like Competitive Programming up your alley.
In Canada (barring Waterloo), there’s not a super big Competitive Programming culture at universities and there’s likely not a lot of pressure to get into it for your future career etc. but in case you are feeling that pressure and feel like Competitive Programming is actually pretty boring: that is fine.
You don’t have to love Data Structures and Algorithms to be a good Software Engineer - actually, as someone who does love them, I find that they seldom appear in the way they for Competitive Programming in the real world. There are plenty of other ways to build up experience / problem solving ability that might be more up your alley.
I guess what I’m trying to say is: Software Engineering / Computer Science is fun, do what you love with it!
Resources
If you’re interested in Getting Started with Competitive Programming, here are some resources to help you out (some of these UI’s are terrible so brace yourselves!)
- Compete McGill Summer Training Blog
- Competitive Programming 3 by Steven Halim
- Training Guide by E869120
- CodeForces (Online Judge)
- Kattis (Online Judge)
- WISP (Coming Soon!)
Stay tuned for WISP - an application that we’re building at Compete McGill to help track your progress on various Competitive Programming topics (and make it a little bit easier to swallow!)