aocgo - Advent of Code solutions in Go
What is Advent of Code?
This. Every year since 2015, starting December 1 to 25, 25 small programming problems are presented on http://adventofcode.com. The challenges are fun to solve in programming language of your choice. I mostly solved those with Elixir in the past, but am looking forward to play with Golang in future challenges. And as I am trying really learn Go, I felt like I should backfill the old challenges throughout 2023.
More about Advent of Code here: https://adventofcode.com/2022/about.
How do I run these?
- To create stubs for solving for instance, 2022/1, run:
go run main.go gen 2022 1
(alsog
instead ofgen
) - To run solution for the same, run:
go run main.go solve 2022 1
(alsorun
,r
ors
instead ofsolve
)
Note: The additional commands (i.e. run
, g
etc) are there because when I am rapidly testing solutions, I have often typed those and failed. So totally for my convenience that one.
Note, empty input.txt
is create after gen
(or g
) command for now. You will need to copy/paste the input data to the file.
FAQ
What version of Go do I need to use for these?
I am using embed
and generics
to solve problems. So at least go 1.18
is needed to run these.
Where are the input files?
I have not shared my inputs as it is discouraged to share inputs on public repository and I respect that. I will purge my past shares soon as I didn't know of info.
Progress - 77.5 of 200
Day | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 |
---|---|---|---|---|---|---|---|---|
⭐ | 37 | 26 | 15 | 11 | 12 | 18 | 19 | 15 |
1 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 |
2 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 |
3 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | |
4 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 |
5 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 |
6 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | 🥇 | |
7 | 🥇 | 🥇 | 🥈 | 🥇 | 🥇 | 🥇 | ||
8 | 🥇 | 🥇 | 🥇 | |||||
9 | 🥇 | 🥇 | 🥇 | |||||
10 | 🥇 | 🥇 | ||||||
11 | 🥇 | 🥇 | ||||||
12 | 🥇 | 🥇 | 🥇 | |||||
13 | 🥇 | 🥇 | ||||||
14 | 🥇 | |||||||
15 | 🥇 | |||||||
16 | 🥇 | |||||||
17 | 🥇 | |||||||
18 | ||||||||
19 | ||||||||
20 | 🥇 | 🥇 | ||||||
21 | 🥇 | |||||||
22 | ||||||||
23 | 🥈 | |||||||
24 | 🥇 | |||||||
25 | 🥈 | 🥈 | 🥈 | 🥈 | 🥈 |