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

https://github.com/bendmyers/advent_of_code_2020

Solutions for Advent of Code 2020
https://github.com/bendmyers/advent_of_code_2020

advent-of-code coding-challenges

Last synced: 9 months ago
JSON representation

Solutions for Advent of Code 2020

Awesome Lists containing this project

README

          

# 🎄 Advent of Code 2020 Solutions

[**Advent of Code**](https://adventofcode.com) is a yearly event where coding challenges are published every day in December leading up to Christmas. Each day's challenges consist of two parts. These coding challenges get progressively harder each day, and solving them efficiently usually requires an understanding of data structures and algorithms.

I'm putting all of my solutions up as I complete them, along with a README that shares my thought process and what I learned.

***

## Running the code

First, clone the repository locally using Git.

```bash
git clone https://github.com/BenDMyers/Advent_Of_Code_2020.git
cd Advent_Of_Code_2020
```

These puzzles require input files. Out of respect for the developers, I'm not committing those input files to this repository. To get a puzzle's input, you'll want to go to the given day's puzzle on [Advent of Code](https://adventofcode.com), and copy the day's given input file. Save the contents of that file to the day's subdirectory as `.input`. For instance, if you want to run Day 7, save the input file as `/07/.input`.

Finally, run the given day's code using the [Node.js](https://nodejs.org) runtime. If you're in the root level of the repository, you can run a given day with `node `. For instance, to run Day 7's code, run:

```bash
node 07
```

***

## See my solutions

| Day | Takeaways |
|-----|----------|
| [Day 1](/01/) | Refactoring nested for-loops to recursion |
| [Day 2](/02/) | Regexes with named capturing groups |
| [Day 3](/03/) | Using modulo to simulate repeating patterns |
| [Day 4](/04/) | `RegExp` and debugging regexes with named capturing groups |
| [Day 5](/05/) | Runtime complexity with presorting |
| [Day 6](/06/) | `Set` |
| [Day 7](/07/) | Lookup tables, memoization |
| [Day 8](/08/) | Control flow and mutations |
| [Day 9](/09/) | Queues |
| [Day 10](/10/) | Memoization |
| [Day 11](/11/) | Cellular automata |
| [Day 12](/12/) | Rotating a point on a Cartesian plane, IIFEs |
| [Day 13](/13/) | Chinese Remainder Theorem, BigInts |
| [Day 14](/14/) | Quasi-bitstrings, recursive permutations |
| [Day 15](/15/) | `Map` for memoization |
| [Day 16](/16/) | Solving logic puzzles programmatically |
| [Day 17](/17/) | Infinite 3D/4D cellular automata |
| [Day 18](/18/) | Evaluating expressions with custom operator precedences |
| [Day 19](/19/) | |
| Day 20 | |
| [Day 21](/21/) | Logic puzzles with `Set` |
| [Day 22](/22/) | Recursive card games |
| [Day 23](/23/) | Circular linked lists attached to `Map`s |
| Day 24 | |
| [Day 25](/25/) | |