Advent2022 icon indicating copy to clipboard operation
Advent2022 copied to clipboard

Advent Of Code 2022

New year, same me

Watch me code in Haskell for 25 days straight

Day Part 1 Part 2 Day Part 1 Part 2 Day Part 1 Part 2
Day 01 Day 10 Day 19
Day 02 Day 11 Day 20
Day 03 Day 12 Day 21
Day 04 Day 13 Day 22
Day 05 Day 14 Day 23
Day 06 Day 15 Day 24
Day 07 Day 16 Day 25
Day 08 Day 17
Day 09 Day 18

Personnal Feedback

Day 01:

Nothing quite remarkable, I wasn't going to use splitOn at first but I decided it was cleaner to use it (I am not sure it is standard though.)

Day 02:

Because this is really simple to solve, I tried to do it in the most cumbersome and compact way possible. Basically, the idea is to put everything in a matrix and notice that there is a cycle to the possible scores.

Day 03:

Weirdly enough, I really liked this one. I am quite proud of my solution :D

Day 04:

It is way too early for me to be awake, my solution is quite silly but it works.

Day 05:

The hardest part about this one was the parsing, and even that wasn't too hard

Day 06:

Easiest one.

Day 07:

This one was a bit harder, but once the parsing is done then it's not that hard. Is it weird that part 2 was easier than part 1 for me ? Anyway, tree traversals go brrrrrr (although I'd hoped to make my code clean which isn't the case right now :,()

Day 08:

Ah yes, my favorite time of the year: manipulating 2D grids in Haskell (/s) Well, it didn't go so bad, I definitely feel like I'm getting better at this every year!

Day 09:

I spent so much time on this simply because I didn't understand properly how moving works

Day 10:

Definitely one of the easiest ones so far (not as easy as Day 6, but still really easy)! I'm pretty sure that, had I woken up before 6AM today, I could actually have been in the leaderboard 🙀

Day 11:

Definitely one of the hardest to implement in Haskell so far. Proud to be a maths enthusiast

Day 12:

Probably my cleanest BFS in Haskell

Day 13:

This. This is the day I can proudly say "I know a bit of Haskell".

Day 14:

Highly unoptimised solution goes brrrr (part 2 takes like 1 second to run :ono)

Day 15:

And there I was, thinking my day 14 was unoptimised. 15 seconds to run part 2, but I'm taking it

Day 16:

Memoisation goes brrrrrrr (help me, I'm losing my mind, this one was way harder than any other day before)

Day 17:

Ok, this one was both really enjoyable but also somewhat frustrating. I felt I had to take a huge guess to see that the way to pile blocks was periodic.

Day 18:

At first I was scared because 3D geometry has never been my strong suit, but it turns out this one was a breather!

Day 19:

That's like day 16 but worse, my runtime is about 1 minute and a half, there might be some simple ways to make it faster but I can't be bothered with that

Day 20:

This one was easy, but I could do better (right now I have a runtime of 1 minute, which is not really fancy for such a simple problem), I might come back to it later

Day 21:

Another easy one, my solution is not the most optimised but it works well enough (and fast enough, 0.03s!)

Day 22:

Part 1 is really easy and enjoyable. Now about part 2: remember when I said I hated 3D geometry? That should tell you how much I enjoyed it. In the end my solution for part 2 was just hardcoding the wrapping transitions, which works for my input but not the example (different cube net shapes). It is possible that every input has the same cube net shape, in which case my solution will work on any input, just not on the example.

Day 23:

Probably one of the easiest part 2 ever, I only added a single line of code lol.

Day 24:

Nothing too hard, just a bunch of BFS

Day 25:

Wow, it's over... It kind of feels weird, this is my first time finishing the advent of code 🥹