Algorithm Designex06e2_shortest
Shortest Path with Negative Edge
d6403127-ae2d-450b-ad99-273a4cc36310.cppC++
1// Loading code...Selected Submission
100 / 100
0.001s
1476 KB
Shortest PathGraph
Time Comp.
O(V*E)
Space Comp.
O(V)
Readability
6/10
"The code implements a single-source shortest path algorithm, specifically the Bellman-Ford algorithm, to find the minimum distances from a source node to all other nodes in a graph. The negative cycle detection is also present, indicated by the 'change' variable."
History
| Attempt | Points | Time ↓ |
|---|---|---|
| Try #6 | 100 | 5/1/2025 |
| Try #5 | 100 | 5/1/2025 |
| Try #4 | 0 | 5/1/2025 |
| Try #3 | 100 | 4/1/2025 |
| Try #2 | 100 | 4/1/2025 |
| Try #1 | 100 | 4/1/2025 |