MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / dfsOfGraph

Method dfsOfGraph

CPP/graph_tree/dfs.cpp:14–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 }
13public:
14 vector<int>dfsOfGraph(int V, vector<int> adj[]){
15 vector<int> storeDfs;
16 vector<int> vis(V+1, 0);
17 for(int i = 1;i<=V;i++) {
18 if(!vis[i]) dfs(i, vis, adj, storeDfs);
19 }
20 return storeDfs;
21 }
22};
23
24void addEdge(vector<int> adj[],int u,int v)

Callers 1

mainFunction · 0.80

Calls 1

dfsFunction · 0.70

Tested by

no test coverage detected