Update shortestPaths.cpp