Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jraams/aoc-2024

Advent of Code 2024
https://github.com/jraams/aoc-2024

2024 advent-of-code bun puzzle typescript

Last synced: about 21 hours ago
JSON representation

Advent of Code 2024

Awesome Lists containing this project

README

        

# Advent of Code 2024

https://adventofcode.com/2024 by [Eric Wastl](http://was.tl/)

Solutions using TypeScript with Bun (v1.1.38)

![ten years of advent of code!](tenyears.png)

![day 14 part 2 result: christmas tree](./src/14/tree.png)

## 1. Requirements

- Bun https://bun.sh/docs/installation

## 2. Running

`bun install`

Go to the folder of a specific day:

`cd src/01`

Create the file `input.txt` and paste aoc puzzle input

Run part A or B

`bun run a.ts`

## 3. Puzzle descriptions

1. 💫️🌑️🌑️🌑️🌑️ Starting off easy with some simple calculations
2. 💫️🌑️🌑️🌑️🌑️ Abs + sign to calculate whether or not a report is safe.
3. 💫️🌑️🌑️🌑️🌑️ Look in computer memory instructions string for MUL(x,y) with some regexes
4. 💫️💫️🌑️🌑️🌑️ Finding X-MAS patterns in a grid of characters
5. 💫️💫️🌑️🌑️🌑️ Ordering pages according to a ruleset, basic sorting algorithm
6. 💫️💫️💫️🌑️🌑️ Grid walking until out of bounds + cycle prediction
7. 💫️💫️🌑️🌑️🌑️ Recursion for calculating all possible number equation outcomes using operators (+, \*, ||).
8. 💫️💫️🌑️🌑️🌑️ Finding antinodes in a grid of antennas with different frequencies
9. 💫️💫️💫️💫️🌑️ Filesystem disk / block defragmenter
10. 💫️💫️🌑️🌑️🌑️ Finding all possible routes in a heightmap grid
11. 💫️💫️🌑️🌑️🌑️ Applying rules to a line of rocks, like a growing 1d game of life. ([2021 day 6](https://adventofcode.com/2021/day/6))
12. 💫️💫️💫️💫️🌑️ Calculating area / perimeter of weirdly shaped plots of land in a grid
13. 💫️💫️💫️💫️🌑️ Using Cramer's rule to calculate a system of two equations
14. 💫️💫️💫️🌑️🌑️ Moving robots in a 2D grid with a cycling pattern that end up creating a picture of a tree.
15. 💫️💫️💫️🌑️🌑️ Predicting a robots position in a 2D warehouse grid. The robot can move multi cell objects.
16. 💫️💫️💫️💫️🌑️ Finding all paths in a 2D grid where turning is 1000x more expensive than going straight.
17. 💫️💫️💫️💫️💫️ Intcode computer with a catch: find an input that turns the program output into itself
18. 💫️💫️💫️🌑️🌑️ Pathfinding in a 2D grid where more and more obstacles get added.
19. 💫️💫️💫️🌑️🌑️ Find all ways to arrange towels using unlimited amounts of colored stripe patterns.
20. 💫️💫️💫️💫️🌑️ Find all ways of cheating to save at least 100 steps in a 2D grid maze
21. 💫️💫️💫️💫️💫️ Find recursive keypad movement sequences (^>v