MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / dfsCount

Method dfsCount

KosarajuAlgo.java:12–19  ·  view source on GitHub ↗
(int node, boolean[] vis, ArrayList<ArrayList<Integer>> adjT)

Source from the content-addressed store, hash-verified

10 st.push(node);
11 }
12 private void dfsCount(int node, boolean[] vis, ArrayList<ArrayList<Integer>> adjT) {
13 vis[node] = true;
14 for (Integer it : adjT.get(node)) {
15 if (!vis[it]) {
16 dfsCount(it, vis, adjT);
17 }
18 }
19 }
20 //Function to find number of strongly connected components in the graph.
21 public int kosaraju(int V, ArrayList<ArrayList<Integer>> adj)
22 {

Callers 1

kosarajuMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected