Synopsys interview question

Shortest path in Undirected Graph having unit distance