← Quit0 / 0 correct
What is the standard Dijkstra priority queue in Rust?
let mut pq = BinaryHeap::new();
pq.push(Reverse((0u64, start)));
while let Some(Reverse((d, u))) = pq.pop() {
if d > dist[u] { continue; }
// relax edges...
}What is the standard Dijkstra priority queue in Rust?
let mut pq = BinaryHeap::new();
pq.push(Reverse((0u64, start)));
while let Some(Reverse((d, u))) = pq.pop() {
if d > dist[u] { continue; }
// relax edges...
}