Skip to content

ATholin/advent-of-code

Repository files navigation

Advent of Code ⭐️

GitHub Workflow Status codecov Maintainability code style: prettier Last Commit on GitHub

This repository contains my solutions for Advent of Code problems. All solutions are implemented in TypeScript and JavaScript, runnable with modern Node.js.

2020 Progress

Day Part 1 Part 2
Day 1 0.31ms 1.19ms
Day 2 4.06ms 2.87ms
Day 3 0.23ms 0.46ms
Day 4 2.82ms 3.80ms
Day 5 11.6ms 17.8ms
Day 6 11.2ms 15.7ms
Day 7 322ms 😱 16.1ms
Day 8 10.7ms 79.1ms
Day 9 10.2ms 13.3ms
Day 10 8.40ms 6.22ms
Day 11 1944ms 😱 1729ms 😱
Day 12 12.6ms 8.97ms
Day 13 9.08ms 9.67ms
Day 14 11.7ms 111ms
Day 15 5.96ms 5716ms 😱
Day 16 12.6ms 29.8ms

Usage

Prerequisites: install Node.js 14 (LTS) or later.

Quick-start instructions

  1. Create an account at https://adventofcode.com.
  2. Fork this repo
  3. Clone the forked repository
  4. cd into the repository and run npm install
  5. Copy the example environment file to .env:
cp .env.example .env
  1. In the created .env file, add your AOC session token to the SESSION variable

  2. Scaffold a puzzle:

npm scaffold 							# Scaffold the current day
npm run scaffold -- --year 2015 --day 1	# Scaffold [year] [day]
  1. Run a puzzle:
npm start 			# Run the current day
npm start 2015 1 	# Run [year] [day]

Testing

Run the tests with:

npm test

Run the tests (in parallel) with:

npm run test:parallel

License

The MIT License (MIT). Please see License File for more information.

About

"Solutions" to AoC

Topics

Resources

License

Stars

Watchers

Forks

Contributors