Welcome to my solutions for Advent of Code 2024. This repository contains solutions organized by day, each implemented using Deno and managed with pnpm.
Each solution file is named using a consistent naming convention:
- aoc-<day_number>
- Example:
aoc-1
,aoc-2
,aoc-3
.
- Example:
The corresponding file structure looks like this:
root/
|-- aoc-1/ # Solution for Day 1
| |-- main.ts # Code for Day 1
|-- aoc-2/ # Solution for Day 2
| |-- main.ts # Code for Day 2
...
|-- README.md
To get started, follow these steps:
-
Clone the repository:
git clone <repo-link> cd <repo-folder>
-
Install dependencies:
pnpm i
-
Run the Deno server:
pnpm watch
This will start the Deno server for running solutions.
To add a new solution file for a specific day:
-
Create a new directory using the naming convention
aoc-<day_number>
.mkdir aoc-3 cd aoc-3
-
Add the
main.ts
file for your solution in that directory. -
Update this README.md file by adding a new link to the corresponding day:
### Day X - [Day X Solution](https://adventofcode.com/2024/day/X): [aoc-X/main.ts](aoc-X/main.ts)
For Day 3:
### Day 3
- [Day 3 Solution](https://adventofcode.com/2024/day/3):
[aoc-3/main.ts](aoc-3/main.ts)
To run a specific day's solution:
cd aoc-<day_number>
# Run the file with Deno
pnpm deno run main.ts
Example:
cd aoc-2
pnpm deno run main.ts
For more details on the challenges, visit the official Advent of Code 2024 website.
Happy Coding! 🎄✨