Welcome to my Advent of Code solutions repository! Advent of Code is an annual event in which participants solve a series of programming puzzles during the holiday season. Each day, a new puzzle is released, and participants must write code to solve it.
In this repository, you will find my solutions to the Advent of Code puzzles. I have tried to write clean, efficient and I hope that these solutions will be useful to others who are participating in Advent of Code.
I have organized the solutions by day, with each day solutions being stored in a separate directory some solutions have a readme with an explanation of the solution. The solutions are written in Golang, all solutions was made using the golang standard library so no dependencies are required to run the code.
I hope that you enjoy looking through my solutions and that they are able to help you in your own Advent of Code journey. If you have any questions or comments, please don't hesitate to contact me or open an issue in the repository.
To run the code you just need to have golang installed and run the command go run main.go
in the folder of the day you want.
Every day has my own input to change it, just replace the content of input.txt.
Day | Part one | Part two |
---|---|---|
Day 1: Calorie Counting | 25.9µs |
3.67µs |
Day 2: Rock Paper Scissors | 150.83µs |
132.41µs |
Day 3: Rucksack Reorganization | 2.95ms |
2.52ms |
Day 4: Camp Cleanup | 729.40µs |
729.40µs |
Day 5: Supply Stacks | 1.76ms |
1.59ms |
Day 6: Tuning Trouble | 636.71ms |
921.15ms |
Day 7: No Space Left On Device | 63.85µs |
39.9µs |
Day 8: Treetop Tree House | 7.04ms |
7.04ms |
Day 9: Rope Bridge | 3.88ms |
2.86ms |
Day 10: Cathode-Ray Tube | 24.817µs |
61.165µs |
Day 11: Monkey in the Middle | 198.27µs |
53.6µs |
Day 12: Hill Climbing Algorithm | 3.74ms |
608.15ms |
Day 13: Distress Signal | 5.028ms |
3.57ms |
Day 14: Regolith Reservoir | 524.12µs |
15.84ms |
Day 15: Beacon Exclusion Zone | 352.76ms |
1.22s |
Day 16: Proboscidea Volcanium | 618.93ms |
2.55s |
Day 17: Pyroclastic Flow | 7.8ms |
-ms |
Day 18: Boiling Boulders | 1.7ms |
9.03ms |
Day 20: Grove Positioning System | 1.01s |
10.04s |
Day 21: Monkey Math | 2.58ms |
206µs |
Day 23: Unstable Diffusion | 25.20ms |
2.68s |
time was measured by running the code 5 times with my input and taking the average
Rig specifications:
OS: Ubuntu 20.04.5 LTS x86_64
CPU: AMD Ryzen 5 1600 (12) @ 3.200GHz
RAM: 16Gb @ 2.133GHz
obs: some parts use pre-calculated data from another part, while others are calculated at the same time
obs2: the measured time does not count the input parsing time