🟠 Dijkstra — Single-Source Shortest Path
USACO C++ Book · Interactive Visualizer
🟠 Dijkstra — Single-Source Shortest Path Full Demo
Shortest Path
O((V+E)logV)
Step 0/11
📊 Graph (directed weighted graph, starting from node 0)
🗂 Data Structures
Priority Queue
dist[] Shortest Distance
Settled
Time:
O((V+E)logV)
Space:
O(V+E)
💻 Code
Hint
Click
Next Step ▶
to start and observe the priority queue, dist array, and code highlight update in sync.
◀ Prev
Next Step ▶
↺ Reset
0/11
Keyboard:
→
Next
←
Prev
R
Reset