I'm given a grid with heights of the terrain. I need to find paths that move from 0 to 9 gradually increasing one each step. In part 1, I count the number of possible start / end combinations. In part 2, I count the number of possible trails between each start / end combination. I'll use breadth first search to knock this out quickly.
2024 AOC repo: [ Ссылка ]
2024 AOC Intro vide: [ Ссылка ]
VSCode Debug video: [ Ссылка ]
☕ Buy Me A Coffee: [ Ссылка ]
[00:00] Part1 introduction
[00:53] Setup / data overview
[02:08] Parsing input into grid
[03:06] Finding starting points
[04:42] Starting BFS
[05:55] Looping over queue
[09:40] Summing all starts
[09:58] Fixing bugs
[10:56] Solving part 1
[11:25] Part 2 challenge
[12:04] Adding count
[13:20] Fumbling over pretty way to do 1 and 2 together
[13:54] Solving part 2
[14:11] Conclusion
#adventofcode #python
Ещё видео!