Written in TypeScript for learning purposes. Focus on code readability, not performance.
First, install dependencies with:
npm ci
The solution for each day can be run separately with:
npm run <day_num>
(for example npm run 01
)
Run all unit tests with:
npm run test
Run eslint and prettier with:
npm run lint
The directory for each day contains the following files:
solution.ts
- has functions
part1()
andpart2()
. These functions solve the problem and print the solution for the day.
- has functions
run.ts
- runs the
part1()
andpart2()
functions fromsolution.ts
- called by the
npm run <day_num>
script in package.json
- runs the
input.txt
README.md
- problem description
For some days, there are additional *.ts
files for better code organization.
The template
directory contains a template for the files for one day.
The utils
directory contains some utilities used across the project.