Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxim-mazurok/advent-of-code

These are my TypeScript solutions for the Advent of Code challenges
https://github.com/maxim-mazurok/advent-of-code

advent-of-code advent-of-code-2023 advent-of-code-javascript advent-of-code-typescript

Last synced: 26 days ago
JSON representation

These are my TypeScript solutions for the Advent of Code challenges

Awesome Lists containing this project

README

        

# Advent Of Code - TypeScript Solutions

These are my TypeScript solutions for the [Advent of Code](https://adventofcode.com/) challenges. This is not supposed to be a guide or a reference, but rather a place to store my solutions and track my progress.

## Structure examples

`year/day/part` structure is used

For simple problems:

- [`2023/1/input.txt`](./2023/1/input.txt) - **input** for the **1st day** challenge of 2023 year
- [`2023/1/1.spec.ts`](./2023/1/1.spec.ts) - **solution** for the **1st part** of the **1st day** challenge of 2023 year
- [`2023/1/2.spec.ts`](./2023/1/2.spec.ts) - **solution** for the **2nd part** of the **1st day** challenge of 2023 year
- ...

For more challenging problems (for example, for the **9th day** challenge of 2023 year):

- [`2023/9/9.input.txt`](./2023/9/9.input.txt) - **input** for the challenge
- [`2023/9/1.statement.txt`](./2023/9/1.statement.txt) - **statement** for the **1st part** of the challenge; useful to provide context for co-pilot
- [`2023/9/1.code.ts`](./2023/9/1.code.ts) - **solution** for the **1st part** of the challenge
- [`2023/9/1.spec.ts`](./2023/9/1.spec.ts) - **tests** for the **1st part** of the challenge
- [`2023/9/1.ts`](./2023/9/1.ts) - standalone script to solve the **1st part** of the challenge; Useful for long-running solutions and debugging

## Usage

1. `git clone https://github.com/Maxim-Mazurok/advent-of-code`
1. (optional) `nvm i` - or use any other node version manager of choice
1. `npm i`
1. `npm start`

To run a standalone script, use:

```bash
npx -y tsx 2023/9/1.ts
```