Skip to content
Snippets Groups Projects
Commit 45572c62 authored by Falk Rehse's avatar Falk Rehse
Browse files

Day 12-1

parent 597500c5
Branches
No related tags found
No related merge requests found
......@@ -48,9 +48,9 @@ pub fn solve(heights: &Vec<Vec<char>>) -> u32 {
let start = start.expect("Expected a start node!");
let end = end.expect("Expected an end node!");
let shortest_path = algo::dijkstra(&graph, start, Some(end), |_| 1);
let dijkstra = algo::dijkstra(&graph, start, Some(end), |_| 1);
shortest_path.len() as u32
dijkstra[&end]
}
fn add_edges(graph: &mut Graph<char, ()>, nodes: &Vec<Vec<NodeIndex>>, y: usize, x: usize) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment