Files
2019/days
Parnic effd94c09b Day 20 solution
Part 1 was pretty much just day 18 again, but without doors and with an input data parsing skill check. I simplified day 18 and went with a basic Dijkstra algorithm after the DFS to crawl the maze which solved this just fine.

Part 2 messed me up more than I was expecting. The key feature for part 2 is changing up what the Dijkstra solver views as an "adjacent" node and injecting the appropriate depth as we traverse inner/outer portals. The main thing that tripped me up here from part 1 was that I needed to be carrying more data along with portals than just their locations, and I could no longer get away with storing the portals as pairs of their inner/outer locations, so a small refactor was needed. Once I made those corrections, it was mostly a matter of ironing out the "get neighbors" function to adhere to part 2's rules, which took me a lot of debugging to get just right.

Part 2 still took me longer than I'd care to admit. I had problems wrapping my head around the problem.
2022-07-14 14:54:02 -05:00
..
2022-06-06 15:30:58 -05:00
2022-06-13 15:29:18 -05:00
2022-06-21 12:22:30 -05:00
2022-06-09 08:23:34 -05:00
2022-06-13 15:29:18 -05:00
2022-06-14 09:21:10 -05:00
2022-06-29 08:11:33 -05:00
2022-06-16 08:24:56 -05:00
2022-06-20 08:54:52 -05:00
2022-06-21 12:18:31 -05:00
2022-06-22 08:17:45 -05:00
2022-06-23 10:08:33 -05:00
2022-06-27 00:01:19 -05:00
2022-06-28 08:32:59 -05:00
2022-06-29 08:11:33 -05:00
2022-06-29 08:11:33 -05:00
2022-06-30 08:03:18 -05:00
2022-07-11 09:31:26 -05:00
2022-07-12 08:45:47 -05:00
2022-07-13 08:40:48 -05:00
2022-07-14 14:54:02 -05:00