# Packages
No description provided by the author
# README
Advent of Code 2024 šāØ
Merry Christmas!
------------------------
\
\
\ ,_---~~~~~----._
_,,_,*^____ _____``*g*\"*,
/ __/ /' ^. / \ ^@q f
[ @f | @)) | | @)) l 0 _/
\`/ \~____ / __ \_____/ \
| _l__l_ I
} [______] I
] | | | |
] ~ ~ |
| |
| |
Welcome to Advent of Code 2024! š ⨠This repo features my solutions to the daily programming puzzles, written in Golang, with a clean architecture for festive coding!
Why Go? š¹
- Coolness: I like Go and don't get the chance to use it on my day-to-day
- Speed: No waiting around for Santa's sleigh.
- Simplicity: Go keeps the solutions straightforward and delightful.
- Concurrency: Perfect for parallelizing Santa's busy workshop tasks.
Repo Structure š
Here's how the magic is organized:
.
āāā LICENSE # Licensing information
āāā cmd
ā āāā main.go # Entry point for running solutions
āāā go.mod # Go module configuration
āāā internal
ā āāā day1
ā ā āāā day1.go # Solution logic for Day 1
ā āāā day2
ā ā āāā day2.go # Solution logic for Day 2
ā āāā utils # Some utils to help
ā āāā filereader
ā ā āāā filereader.go # File parsing utilities
ā āāā math
ā ā āāā math.go # Math helpers
ā āāā matrix
ā āāā matrix.go # Matrix manipulation helpers
āāā puzzles # Puzzle input files (ignored in Git)
āāā day2
āāā example1.txt
āāā input1.txt
Running a Solution š
To solve the puzzles for a specific day, run the following command:
go run cmd/main.go <day-number>
Example
go run cmd/main.go 2
Output
Advent of Code 2024
DAY 2
Part 1:
The solution is: 218
Part 2:
The solution is: 290
Adding New Days šļø
-
Create a new directory under
internal
for the day:mkdir -p internal/day3
-
Write your solution in
internal/day3/day3.go
. -
Update
cmd/main.go
to include a case for the new day.