Module aoc::y23d11

source ·
Expand description

Advent of Code 2023 Day 11: https://adventofcode.com/2023/day/11

I originally wasn’t sure how to handle this problem, and I considered building a large grid to hold all of the galaxies (and the empty spaces) but I was stuck on how to properly expand it for the empty rows/columns. Part two would have then probably made the memory requirements outrageous adding millions and millions of entries. Inspiration from the Advent of Code subreddit instead led me down the path of instead just finding the empty rows and columns and then adding them to the distance instead of expanding the grid (or trying to modify the galaxy coordinates) and then computing the Manhattan distance afterwards.

Functions§

  • The solution for the day eleven challenge.