Commit Graph

2 Commits

Author SHA1 Message Date
61227ba688 Dramatic speedup for day 12 part 2
This enables a flood-fill of distances from the goal location to every other location on the grid. With that, we only have to locate the node with the lowest distance value.

Technically this also solves part 1, but I wanted to leave the forward search in place as a test of sorts that the algorithm works both ways.

Now if I can just get the parse sped up...
2022-12-12 20:27:07 -06:00
2f73611a7c Day 12 solution
This is quite slow, at least for part 2 (and part 1 is slower than I want it to be, event parse takes longer than I thought it should). I need a better approach to the second part. Probably need to mark all nodes' distances from the goal point instead of one-by-one plotting a path from each possible start to the end, but that requires an adjustment to how I'm building the graph in the first place.
2022-12-12 17:13:02 -06:00