This repository contains solutions for Advent of Code 2025 challenges. Each day's solution is stored in its own folder under src/dayX/.
To clone the repository, run:
git clone https://github.com/davidebrognoli/adventofcode2025
Then navigate into the project folder:
cd adventofcode2025
To install the required dependencies, run:
npm install
This will install Vitest for testing and any other dependencies required for the challenges.
input.txt files are not committed to this repository to respect the terms of service. You will need to:
- Create your own
input.txtfile in each day's folder (e.g.,src/day1/input.txt) - Copy your personal input from the Advent of Code website for each day
- Place it in the corresponding day folder before running the solutions
This ensures compliance with Advent of Code's request to not redistribute puzzle inputs.
You can execute the solution for each day by using the following command:
npm start X
Where X is the day number (e.g., 1 for Day 1, 2 for Day 2, and so on).
To run the solution for Day 1, you can use:
npm start 1
This will execute the code in src/day1/index.js.
To run the tests for the solutions, use Vitest. You can run the tests with:
npm test
For a single run without watch mode:
npm run test:run
Alternatively, you can run specific tests with:
npx vitest run <test-pattern>
adventofcode2025/
├── src/
│ ├── day1/
│ │ |── index.js # Solution for Day 1
| | └── input.txt # Input file for Day 1
│ ├── day2/
│ │ └── index.js # Solution for Day 2
| | └── input.txt # Input file for Day 2
│ |── ...
│ ├── utils.js # Utility functions (e.g., input parsing)
├── run.js # Script to launch solutions for specific days
├── package.json # Project configuration
├── test/
│ ├── day1.test.js # Vitest tests for Day 1
│ └── ...
└── README.md # This file
└── LICENSE # License
This project is licensed under the ISC License - see the LICENSE file for details.