Erik Johnson

@terminalmage
1 Followers
67 Following
241 Posts
Perfect, no notes.

I've completed "Snowverload" - Day 25 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/25

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day25.py

I got to learn a new algorithm today! Nice way to end AoC for the year.

Day 25 - Advent of Code 2023

I just completed "Never Tell Me The Odds" - Day 24 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/24

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day24.py

Part 2 is my least-favorite AoC puzzle ever. In the end I did what many other people did and just used z3 to solve it. Maybe it's the COVID fallout, but I don't have the brainpower to write an algorithm that will solve this in a reasonable amount of time. Maybe I'll come back in the future and write a non-z3 solution.

Day 24 - Advent of Code 2023

I just completed "A Long Walk" - Day 23 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/23

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day23.py

My initial DFS solution crashed and burned, so I tried calculating the distance between branching nodes and creating a DFS graph. This worked great for Part 1, but I couldn't get the logic for Part 2 correct without community help.

Day 23 - Advent of Code 2023

I just completed "Sand Slabs" - Day 22 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/22

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day22.py

Solved Part 1 using brute-force, then had to re-write the entire thing for Part 2. 😩

Day 22 - Advent of Code 2023

Thanks to some helpful AoC community members, I discovered the issue with the way I was doing the interpolation, and I've updated my Day 21 #AdventOfCode solution.

https://github.com/terminalmage/adventofcode/blob/main/2023/day21.py

If you're still struggling with this one, check my solution, it's well-documented.

adventofcode/2023/day21.py at main · terminalmage/adventofcode

Contribute to terminalmage/adventofcode development by creating an account on GitHub.

GitHub

I just completed "Step Counter" - Day 21 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/21

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day21.py

I honestly don't know why this doesn't work without using the ceiling of number of grids.

Day 21 - Advent of Code 2023

I just completed "Pulse Propagation" - Day 20 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/20

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day20.py

Getting this one right was not difficult... it was just very tedious. Doing so without OOP would be... unpleasant.

Day 20 - Advent of Code 2023

I just completed "Aplenty" - Day 19 - Advent of Code 2023 #AdventOfCode https://adventofcode.com/2023/day/19

My solution in #Python: https://github.com/terminalmage/adventofcode/blob/main/2023/day19.py

The 2 hardest things about programming:

0. Cache invalidation
1. Naming things
2. Off-by-one-errors

Day 19 - Advent of Code 2023