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

Function count_paths

graph/number_of_paths.cpp:67–78  ·  view source on GitHub ↗

* @brief Counts the number of paths from node `u` to node `v` in a directed graph * using Depth First Search (DFS) * * @param A adjacency matrix representing the graph (1: edge exists, 0: no edge) * @param u the starting node * @param v the destination node * @param n the number of nodes in the graph * @returns the number of paths from node `u` to node `v`

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

testFunction · 0.85

Calls 2

count_paths_dfsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected