Module day23

Source

Structsยง

Input
State ๐Ÿ”’

Functionsยง

dfs ๐Ÿ”’
Modified depth first search that only allows paths that skip one node.
graph_to_grid ๐Ÿ”’
parse
part1
The graph is directed so the only allowed steps are down or to the right. The maximum value for any cell is the maximum of either the cell to the left or above.
part2
Graph is undirected so we can also move up or to the right.