Dijkstra Algo Impl for Creating Overlay Network