/AdventOfCode

Solved Solutions and Descriptions for Advent of Code 2021

Primary LanguageTypeScript

A humble documentation of my attempts at solving the Advent of Code each year, written in Typescript.

Run Tests

Year
2015
2020
2021
2022
2023

Prerequisites

  • You need to have Node.js and pnpm installed on your system.
$ node -v
v18.12.1

$ pnpm -v
7.17.1
  • Clone the repository and cd into the working directory
$ git clone https://github.com/AmruthPillai/AdventOfCode.git && cd AdventOfCode
  • Install required dependencies
$ pnpm install

Testing

Every challenge is battle-tested with Jest, a resilient testing framework, against two inputs (sample, generated). To run the tests for all challenges, across all years, just run:

$ pnpm test

To run any specific tests, you can also use pattern matching:

$ pnpm t 2021 # Run tests for all challenges from AoC 2021
$ pnpm t 2021/day-4 # Run tests for day 4 challenge from AoC 2021