This repository contains my solutions for the Advent of Code 2024 challenges, implemented in Go (Golang).
# Add your input.txt file in the folder of the day you want to run
# run specific day (x = number of day)
$ make run-day day=x
# run all days
$ make run-all
# Also you run directly using go:
$ go run <day>/main.go| Day | Solution | Comments |
|---|---|---|
| Day 1: Historian Hysteria | Link | |
| Day 2: Red-Nosed Reports | Link | |
| Day 3: Mull It Over | Link | |
| Day 4: Ceres Search | Link | |
| Day 5: Print Queue | Link | |
| Day 6: Guard Gallivant | Link | |
| Day 7: Bridge Repair | Link | |
| Day 8: Resonant Collinearity | Link | |
| Day 9: Disk Fragmenter | Link | I used this solution for the part B, i got stuck a lot of time, that solution save the day |
| Day 10: Hoof It | Link | |
| Day 11: Plutonian Pebbles | Link | The first version for part A, I made using slices and for 25 iterations it was OK. For part B (75 iterations), it no longer worked, so in the end, I had to redo it using the recursive function 'blink' and storing previously calculated results with a map (cache) to avoid recalculating them. |
| Day 12: Garden Groups | Link | |
| Day 13: Claw Contraption | Link | Here is the explanation of the solution. Spoiler: Cramer's Rule |
| Day 14: Restroom Redoubt | Link | The tip for the part 2 is move robots until their do not overlaps and count the iterations as seconds |
| Day 15: Warehouse Woes | Link | |
| Day 16: Reindeer Maze | Link | Part A solves using Dijkstra |
| Day 17: Chronospatial Computer | Link | Today is my b-day (39y) 🎉 Today puzzle was fun, but a small bug in one operation took me a while... |
| Day 18: RAM Run | Link | |
| Day 19: Linen Layout | Link | |
| Day 20: Race Condition | Link | |
| Day 21: Keypad Conundrum | Link | |
| Day 22: Monkey Market | Link | |
| Day 23: LAN Party | Link | For the part B i used the Bron-Kerbosch algorithm to find all maximal cliques in a graph |
| Day 24: Crossed Wires | Link | Guide on the idea behind the solution B |
| Day 25: Code Chronicle | Link |
- Each solution is designed to work with the input provided by the Advent of Code website.
- Make sure to place the input file
input.txt(if required) in the day folder. - I have not included my own input sets in the repository as recommended by one of the mods in the official subreddit.
Happy coding and good luck with Advent of Code 2024! 🎉