SSSP Algorithm working