← Quit0 / 0 correct
RustHard1 of 283

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...
}