Let’s see how many stars we’ll collect.
Please check out Day 1 for introduction and solutions to the first days puzzles.
Advent of Code is a competition but I’d like to emphasize that my main motivation is not to compete or get a place in the leaderboard.
The puzzles are great for learning data structures in Python and how to create better algorithms. They’re also very good mind exercises. Last but not least, it’s so much fun to complete puzzles and collect stars.
As of writing this article, the first 9 puzzles have been released and each puzzle has two parts. I’ve completed both parts of the first two puzzles and the first parts of the second, third, and fourth puzzles. Each part counts as one star. Let’s see how many stars we’ll collect.
Day 2 — Part 1
In the puzzle for day 2, we’re given the data in the following format: