aoc::year2024

Module day16

Source
Expand description

§Reindeer Maze

Solves part one and part two simultaneously.

Part one is a normal Dijkstra search from start to end.

Part two is a a BFS backwards from the end to the finish, tracing the cost exactly to find all possible paths. This reuses the cost information from the Dijkstra without requiring any extra state keeping for the paths.

Constants§

  • DIRECTIONS 🔒
    Clockwise order starting with facing right.

Functions§

Type Aliases§