If we are given a weighted undirected graph in which some nodes are marked as special nodes then how to find for each node v the special node with least cost to reach using Dijkstra?
This solution to a problem uses this concept but i can't figure out how it works. Can someone provide a proof or explanation of it?