Function advent_of_code_2021::day_15::find_shortest_path [−][src]
fn find_shortest_path(
grid: &ExpandedGrid<'_>,
start: (usize, usize),
goal: (usize, usize)
) -> Option<usize>Expand description
Implement Dijkstra’s shortest path algorithm. Copied from BinaryHeap example and modified to get the edge
costs from the provided grid. Originally accepted Grid but it was easier to use one type/method for both parts
and the ExpandedGrid works the same as a Grid if it only has one tile on each axis.
