Synopsys Interview Question

Shortest path in Undirected Graph having unit distance