Optimal Algorithmic Approach
Min-heap Dijkstra: process each node when it's popped from the heap.
Core Invariants & Edge Cases
- Priority queue (min-heap) ordered by distance
- Relax neighbors: if dist[u] + w < dist[v], update dist[v]
- Works only for non-negative weights