Advent of Code 2020: Week 1 Summary

, 5 min read
advent of code 2020

The first week of Advent of Code has seemingly gone by so quickly. It’s been a great week, and I’m incredibly grateful to the creator, Eric Wastl and the rest of the team. You can find links to all my posts and solutions here. In this summary I will mainly focus on the advent of code problems, and the analytics of my blog. However, next week I will discuss my workflow, how I’m feeling about C++ and other tools that I’ve found useful.

In day 1, we explored the two-sum and three-sum problems. For those of you familiar with competitive programming, or leetcode, the former is a typical problem. The latter is slightly less well explored, as it is challenging to optimise beyond repeating the process of the two-sum problem.

Day 2 explored parsing non-standard inputs with a further emphasis on string manipulation. From my discussions with other participants, this was a good problem to soften people up, and prepare them for future challenging input formats. The algorithm side of this puzzle was reasonably routine, e.g. identifying how many of character, C, in a string.

A map of hashes and dots returned in day 3. This has been a staple of previous years of Advent of Code. An input made up punctuation symbolling different objects in a map. See Day 18, 2019 for a great demonstration! This one was a little tamer than that, with some great opportunity to play around with periodic boundary conditions. It was very approachable and great fun!

The data parsing of day 4 was hard. Our input contained lots of fields belonging to different peoples passports. In part 1, we had to validate which passports had all of the required fields. Part 2 involved writing validation code for every field, ensuring the passports had no expired, that the ID code was valid, and so on. This my least favourite this week, however, I learned more regex. I also felt that part 2 followed on very neatly from part 1, which would be useful for programmers of all levels.

Day 5, we had a binary search pattern. For people more familiar with binary than myself, the input could be trivially converted into an integer. For the rest of us mere mortals, we wrote small functions which essentially followed binary search logic to convert strings of “FBBF…” into useful integers. I thoroughly enjoyed this puzzle, especially the space optimisation for part 2.

In day 6, yesterday, the data input wasn’t so bad. It was similar to that of previous days, which was satisfying. We then implemented both intersection and union methods for several containers.

Day 7 was a big step up in difficulty. The input was extremely challenging to parse, and the problem required a recursive algorithm. I really enjoyed this puzzle, mainly because the data input needed me to look things up and broaden my knowledge of regex.

Overall, it’s been a great week covering a whole range of different topics. The problems have, typically, been very approachable with a range of possible solutions.

I’ve included a figure below which shows the time taken, for each day, to obtain both stars. The figure shows the time to solution for the fastest and 100th fastest people on the AoC leaderboard. It’s clear from this figure that both day 4 and day 7 have been the most challenging days. The other days have been very similar in terms of difficulty, with different emphases on input and algorithm.

AoC 2020: time to solution
AoC 2020- Time to solution [Advent of Code]


I would like to preface this section with the following: I would continue to blog Advent of Code 2020 if no one read it.

Nonetheless, I’m happy to share some of the analytics I’ve collected over the past week. My blog has received over 250 unique visitors since the 31st of November, with over 750-page loads.

The figure below shows a plot of the unique visitors per day, for each day in December. The results are divided into morning and afternoon. In general, I receive more visitors in the afternoon, which coincides with the publishing and promoting of my daily posts on twitter.

AoC 2020: time to solution
Unique visitors

In the next figure, I show the analytics of the post detailing my analysis of each puzzle. This data starts on the 4th of December due to some changes to my analytics API. Most blog posts receive the most viewers on the day they are posted; however, there does appear to be some kind of tail of people checking in on a previous days discussion.

AoC 2020: time to solution
Unique visitors per post

These viewing numbers may be measly to some of you. However, I am absolutely blown away with the number of unique visitors my blog has been receiving. Thank you so much for reading, see you for the rest of December!

I have no affiliation with AoC. I’m just a fan of the programming puzzles. If you enjoy them too, please feel free to join in and support the creators


Back to all posts