mirror of
https://github.com/parnic/advent-of-code-2023.git
synced 2025-06-16 08:40:14 -05:00
I solved part 1 the naive way and was reasonably happy with it. I was successfully using that solution with some negative-modulus junk to brute force part 2 (I could get the correct answer for the example data's smaller number of steps), but there was no way it was completing in a reasonable amount of time or without blowing all my RAM. I was at a complete loss for how to solve part 2 the "smart" way, so I learned from this video: https://www.youtube.com/watch?v=9UOMZSL0JTg I understand why this works now, but I was not going to be getting it on my own (nor did I really want to spend the time it would have taken me to attempt to arrive at a similar solution).
11 lines
131 B
Plaintext
11 lines
131 B
Plaintext
...........
|
|
.....###.#.
|
|
.###.##..#.
|
|
..#.#...#..
|
|
....#.#....
|
|
.##..S####.
|
|
.##..#...#.
|
|
.......##..
|
|
.##.#.####.
|
|
.##..##.##.
|
|
........... |