https://github.com/davidebrognoli/adventofcode2024
This repository contains solutions for Advent of Code 2024 challenges.
https://github.com/davidebrognoli/adventofcode2024
advent-of-code advent-of-code-2024 advent-of-code-javascript
Last synced: 16 days ago
JSON representation
This repository contains solutions for Advent of Code 2024 challenges.
- Host: GitHub
- URL: https://github.com/davidebrognoli/adventofcode2024
- Owner: davidebrognoli
- License: other
- Created: 2024-11-30T19:59:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-23T13:05:34.000Z (over 1 year ago)
- Last Synced: 2024-12-23T14:22:59.364Z (over 1 year ago)
- Topics: advent-of-code, advent-of-code-2024, advent-of-code-javascript
- Language: JavaScript
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code 2024
This repository contains solutions for **Advent of Code 2024** challenges. Each day's solution is stored in its own folder under `src/dayX/`.
## Setup
### 1. Clone the repository
To clone the repository, run:
`git clone https://github.com/davidebrognoli/adventofcode2024`
Then navigate into the project folder:
`cd advent-of-code2024`
### 2. Install dependencies
To install the required dependencies, run:
`npm install`
This will install Jest for testing and any other dependencies required for the challenges.
## Running the code
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).
### Example:
To run the solution for **Day 1**, you can use:
`npm start 1`
This will execute the code in `src/day1/index.js`.
## Testing
To run the tests for the solutions, use Jest. You can run the tests with:
`npm test`
Alternatively, you can run specific tests with:
`npx jest `
## Folder Structure
```
advent-of-code2024/
├── 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 # Jest tests for Day 1
│ └── ...
└── README.md # This file
└── LICENSE # License
```
## License
This project is licensed under the ISC License - see the [LICENSE](LICENSE) file for details.