Competitive programming
Students and alumni share their experiences with competitive programming
January 29, 2021
Junior Nathan Wang first started competitive programming out of curiosity in December of 2016. Since then, he has been interested in investigating different ways to solve the same problem. By the summer of 2017, this initial curiosity morphed into a desire to do the activity more seriously as he started ranking higher in competitions.
“Some of the solutions of problems are very elegant and neat,” Wang said. “But of course, another aspect of competitive programming is that if you do well … you can also get promoted to another division. So I guess when there is that pressure for you to do well during a contest and for you to promote [to a different division], then competitive programming becomes a bit less fun, since you’re stressed now.”
Competitive programming involves coding efficient solutions to word problems in the shortest amount of time possible. In order to do this, participants must have knowledge about different algorithms to optimize their code. To prepare for competitions, Wang solves problems from past competitions to test his knowledge of algorithms.
“Getting good at competitive programming just boils down to solving more problems,” Wang said. “Most of the problems I used … were just all recycled problems.”
Wang participates in the USA Computing Olympiad (USACO), which holds competitive programming contests four times a year. USACO is broken into four divisions: Bronze, Silver, Gold and Platinum. Participants start at Bronze and have to code solutions to competitive programming problems to work their way up to Silver, Gold and Platinum.
Twenty-seven contestants from the Platinum division, the most prestigious division, are chosen every year to attend USACO Camp, a two week program that is usually held at Clemson University. Attendees at USACO camp are split into two groups: first timers and returning members. During the two week period, first timers focus on learning more about competitive programming, while returning members compete in contests to secure one of four spots on the USA International Olympiad in Informatics (IOI) team. If selected for the USA IOI team, members represent the U.S. and compete against other countries at IOI, a highly prestigious worldwide computer science contest.
Alumni Andy Tang, ‘20, also participated in USACO, qualifying for the USACO camp in May of 2019. As a first timer, he spent most of the time attending lectures and working on a project that involved coding an algorithm to beat Pong, which is a classic video game in which players try to score a goal.
Wang qualified for USACO camp for the second time in April of 2020. Due to COVID-19, USACO Camp was held virtually and he participated in many contests throughout the duration of the online camp. Outside of contests, he says he also attended many interesting computer science talks and met other attendees through their Slack group.
Pre-COVID-19, junior Stephanie Wu remembers attending in-person coding competitions such as the Harker Programming Invitational, where attendees come with a team to solve problems. Since they are only allowed one laptop per team, Wu says that her team would alternate between coding and thinking of solutions.
Competitive programming is unique compared to traditional programming, where the objective is to write sustainable code. Instead, competitive programming focuses on finding an efficient solution to a problem in the shortest amount of time possible.
“Competitive programming, at higher levels, is not really that related to regular programming in the industry,” Wang said. “Because competitive programming in general is about writing code fast. And writing code that works fast. Whereas coding in industry, time complexity isn’t that important … What’s more important is writing maintainable code and writing code that’s easy to understand.”
According to Tang, problems similar to competitive programming ones are often used in job interviews in the software instrusty. Tang stresses the importance of having experience in solving competitive programming problems for people who are interested in computer science to save time in the future.
For Wu, participating in competitive programming has also helped her solve and understand math problems with many test cases.
“It’s much easier for me to code out the [math] problem to get the solution or to see a visual representation of what’s happening,” Wu said. “Because I can’t handle so many cases on paper and it’s much easier to have a computer do it for me.”
Through competitive programming, Tang has learned to rely less on a teacher and learn independently.
“I think a lot of people become dependent on the teacher,” Tang said. “They just pester the teacher with a bunch of questions when they don’t understand something. But something like [competitive programming] is more obscure. I had a few teachers, because I took some classes. But after that I kind of just learned on my own through online tutorials.”
In addition to teaching Wang how to find different ways to approach problems, competitive programming has changed his way of defining success.
“It really challenges you to think critically about problems and to think outside the box when it comes to trying to approach these problems,” Wang said. “And also, training for competitive programming takes a lot of commitment and a lot of patience. And it can be frustrating for some people when they’re trying to practice and they don’t seem to be improving. So, it’s also taught me a lot about how I want to define my success when it comes to training.”