Welcome to my repository for solutions to the Advent of Code challenges, implemented in Python. In this repository, you'll find my solutions for each day's puzzle, along with explanations and any relevant notes.
The repository is structured by day. Each day's problem set has its directory, named according to the convention day_x
. Each directory has three files:
- the input file
input.txt
- the solution to the first part
solutionA.py
- the solution to the second part
solutionB.py
For easier access to the code files, I have provided a table of contents:
Aoc Page | Directory | Source files |
---|---|---|
Day 1 | day_one | Part 1, Part 1 |
Day 2 | day_two | Part 1, Part 2 |
Day 3 | day_three | Part 1, Part 2 |
Day 4 | day_four | Part 1, Part 2 |
Day 5 | day_five | Part 1, Part 2 |
Day 6 | day_six | Part 1, Part 2 |
Day 7 | day_seven | Part 1, Part 2 |
Day 8 | day_eight | Part 1, Part 2 |
Day 9 | day_nine | Part 1, Part 2 |
Day 10 | day_ten | Part 1, Part 2 |
To run a specific day's solution, first navigate to the corresponding directory. For example, for day 1:
cd advent-of-code-2023/day_one
Then, create your input.txt file, open it in and paste your input inside. Press CTRL+C to close the file. Opening it in your preferred file explorer is also possible, but don't forget to save the file!
touch input.txt
cat >> input.txt
Now, execute the solutionA.py
or solutionB.py
script. Make sure you have Python3 installed on your system. For example, to execute the solution from day 1:
python3 solutionA.py
The script will always run on the input file named input.txt
, placed inside the same folder.
This repository is licensed under the GNU GENERAL PUBLIC License - see the LICENSE file for details.
Happy coding! Merry Christmas!π