Advent of Code 2020
30 May 2021Advent of Code 2020
The Advent of Code is a site that during the month of December, posts computer science questions every day for people to answer. The quicker you answer, the more points you get which puts you on top of the leaderboard.
There is a new problem released every day which consists of two parts. The first part usually involves reading in an input text file with some problem statement and providing a single number as a result. The problem statement comes with an example input and result so you can write test code to make sure your code is working. The input for the challenge is usually very long and much harder to debug and test. When you are finished you enter a number into a box and hit submit. If you get the correct answer, you can continue and complete part 2. The second part is usually harder and builds on the first part, using the same input file. If you get the answer wrong you can retry but after a delay. After completing either part of the problem correctly while logged in you get a star and you can collect 2 stars for every problem.
A large part of the solution is building text reading, which is often a main component to the problem. The next part is finding a reasonably fast solution to the problem. In general there are thousands of input lines, which means O(n**2) solutions are probably okay.
I found the site a great way to challenge my computer science skills. It is a good way to learn a new language. One frustrating part is that it can be quite tricky to debug issues if you get the answer wrong due to the large input size. The site does tell you if you are above or below or how close you are. I found a couple of problems very frustrating as I couldn’t work out what the issues were with my code as they would already be passing the sample input. Another aspect is file and string manipulation. Languages like Python provide great libraries for reading files and manipulating strings, but languages like C don’t and take more time to solve.
Overall though an excellent site and would highly recommend it.