Advent of Code 2023 - Day 21

Опубликовано: 30 Март 2026
на канале: Jonathan Paulson
4,321
39

I placed 23rd on part 1; 72nd on part 2; still 4th overall.

Tough problem today! Part 1 is a pretty straightforward BFS. Part 2 you have to figure out how the shortest paths work in the infinite grid. I think its key that the edge of the grid is all empty; then eventually the cost of going an extra tile is just the side length of the grid. It's also helpful that the grid is square.

Problem: https://adventofcode.com/2023/day/21
Solution: https://github.com/jonathanpaulson/Ad...