It's been a while since I used Python, so I'll use AoC 2021 as a refresher.
I tried to make the code as clean and easy to read as possible, and I've also provided a short explanation to most solutions so that they're easier to understand.
The corresponding files for each solution are grouped within a dayXX folder. Each package contains:
- solution.py: my implementation of the solution to the puzzle
- test_solution.py: the test containing the result, confirming the algorithm works
- puzzle.txt: a dump of the puzzle text from the website, with the source link at the top
- input.txt: the puzzle input I received
- Open this project in PyCharm.
- Open the solution or test you want to run.
- Right click it and press Run 'solution'.