Module mbryant_aoc2021::day15
source · [−]Expand description
Use Djikstra’s to traverse the grid, as there isn’t a good heuristic for A*.
All real work is done in day15::a_star
.
The main difficulty was misreading the instructions and tiling incorrectly.
Rust also doesn’t appear to have an efficient priority queue, so we emulate one with a
std::collections::BTreeMap
and Vec
.
Constants
The input map is 100x100.
Functions
Implement A* with a heuristic of 0, also known as Djikstra’s.
Parse directly to a 2D array.