Advent of Code 2023 - Day 23 - Rust
icub3d
0:00 / 0:00
Advent of Code 2023 - Day 23 - Rust
392 просмотра · 2 года назад
icub3d
1,25 тыс. подписчиков
392 просмотра · 2 года назад
Graph theory to the rescue! Part 1 used the slopes to create a directed acyclic graph so we could solve if just by traversing the nodes. Part 2 removed the slopes, so we now the problem is going to just be brute forcing all possible traversals. As such, we need to find a more efficient graph. That turned out to be finding the branching nodes and calculating distances from them. We can then do a traversal of the new simplified graph much more efficiently.
Problem: https://adventofcode.com/2023/day/23
Solution: https://gist.github.com/icub3d/66c1ca...
Longest Path Problem: https://en.wikipedia.org/wiki/Longest...
0:00 Introduction
1:17 Problem Description
03:24 Longest Path Problem
11:10 Part 1
23:45 Part 2