MCPcopy Create free account
hub / github.com/TheAlgorithms/C-Plus-Plus / dijkstra

Function dijkstra

graph/dijkstra.cpp:66–109  ·  view source on GitHub ↗

* @brief Function runs the dijkstra algorithm for some source vertex and * target vertex in the graph and returns the shortest distance of target * from the source. * * @param adj input graph * @param s source vertex * @param t target vertex * * @return shortest distance if target is reachable from source else -1 in * case if target is not reachable from source. */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

testsFunction · 0.70
mainFunction · 0.70

Calls 5

sizeMethod · 0.45
pushMethod · 0.45
emptyMethod · 0.45
topMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected