Dijkstra
VerifiedAnalysis completeAnalysis completeOverview
Computes shortest paths on a weighted, non-negative graph.
Complexity
| Structure | Time complexity |
|---|---|
| Binary heap | O((V+E) log V) |
| Dense adj | O(V^2) |
See the reference for the full algorithm.
Symbols
- function
dijkstragraph::dijkstrapub fn dijkstra(n: usize) -> Vec<u64>
Source
1// Dijkstra on a weighted graph.
2pub fn dijkstra(n: usize) -> Vec<u64> {
3 vec![0; n]
4}Dependencies
Depends on
No direct dependencies.
Used by
No public library uses this one yet.
Relations
No relations declared.
Verification
Verifiedabc300/a/mainatcoder
Diagnostics
No diagnostics.