AOC 2022 — Day 1

Matt E.
4 min readJan 10, 2023

Last month, I did the Advent of Code 2022, a rather special advent calendar. Through a little Christmas story, it offers a programming riddle a day. Each challenge is divided into two parts.

Now that the event is over, I wanted to share my solution to the various challenges.

The ranking system was not very interesting to me, since it’s based on the time to completion from the time of publication of the challenge, which doesn’t happen in my timezone. But the exercises are varied and offer an interesting progression throughout the month.

Disclaimer, I only got 45 stars out of 50, so I won’t be able to present all of the solutions for this year.

With one challenge a day, I didn’t spend too much time cleaning up my code or thinking about optimisation when that wasn’t necessary. I tried to come up with simple solutions that could be quickly implemented.

That’s why here I won’t present the actual code, but rather the logic and algorithm that led me to the solution. I’ll still share a link towards my solution hosted on github if you’re interested in the Javascript implementations of my solutions.

If you never heard about it, here’s the link to discover the event https://adventofcode.com/2022/about

For this year, you are accompanying elves who have gone on an expedition to collect food so that Santa’s reindeer can ensure the delivery of Christmas gifts.

--

--

Matt E.
Matt E.

Written by Matt E.

Software engineer at Achiev & Jounco. Passionate about programming and entrepreneurship