Welcome to my Advent of Code 2025 repository! This repo contains my solutions to the Advent of Code 2025 challenges, solved using Python. Each day has its own folder with the corresponding solution for that day's puzzle.
Advent of Code is an annual event in December, where a new coding puzzle is released each day. Each puzzle requires creative problem-solving and coding skills. The puzzles range in difficulty, and solutions are often written in a variety of programming languages.
The event begins on December 1st, with a new challenge each day leading up to Christmas Eve. It's a fun way to learn, practice programming, and get into the holiday spirit!
The structure of this repository is organized by day. Each day's challenge is contained within its own folder, and the solution for that day is inside a Python file named solution.py.
adventofcode2025/
├── day01/
│ ├── solution.py
│ └── input
├── day02/
│ ├── solution.py
│ └── input
├── day03/
│ ├── solution.py
│ └── input
...
Each folder is named by the day of the challenge (e.g., day01, day02, etc.), and each contains a Python file solution.py with the code that solves the problem for that day, along with an input file containing the puzzle input.
To view and run the solutions locally, clone this repository to your machine:
git clone https://github.com/yourusername/adventofcode2025.git
cd adventofcode2025This project uses UV for fast Python package management and pre-commit for code quality checks.
Install UV using one of the following methods:
macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | shWindows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Or using pip:
pip install uvAfter installing UV, install the project dependencies (including pre-commit):
uv pip install pre-commitThe dependencies are listed in pyproject.toml for reference, but since this is a script-based project (not an installable package), you can install dependencies directly with UV.
- Install pre-commit hooks:
pre-commit install- (Optional) Run pre-commit on all files:
pre-commit run --all-filesEach day's solution is in a separate folder. You can navigate to the corresponding day's folder and run the solution. For example, for Day 1:
cd day01
python solution.pyThe solutions are written in Python, so you will need Python 3.x installed on your machine. You can download Python from here.
This repository uses pre-commit hooks to ensure code quality. The hooks will automatically run on each commit and check for:
- Trailing whitespace
- End of file formatting
- YAML/JSON/TOML syntax
- Code formatting (Black and Ruff)
- Debug statements
- Merge conflicts
You can manually run the hooks at any time:
pre-commit run --all-filesAll solutions in this repository are written in Python. If you want to use another language or modify the code for optimization, feel free to do so!
While this repository is intended to document my own solutions, feel free to fork it, suggest improvements, or share your own solutions to the Advent of Code challenges! If you want to contribute or have any suggestions, please feel free to open an issue or pull request.
If you'd like to contribute, please ensure that your code follows the same structure and style as the existing solutions.
This repository is licensed under the MIT License - see the LICENSE file for details.
Happy coding and enjoy the challenge! 🎄