Min-Cut-In-Directed-Graph C++ Code
Min-Cut-In-Directed-Graph C++ Code
#include<bits/stdc++.h>
using namespace std;
// A DFS based function to find all reachable vertices from s. The function
// marks visited[i] as true if i is reachable from s. The initial values in
// visited[] must be false. We can also use BFS to find reachable vertices
void dfs(vector< vector<int> >& rGraph, int V, int s, bool visited[])
{
visited[s] = true;
for (int i = 0; i < V; i++)
if (rGraph[s][i] && !visited[i])
dfs(rGraph,V, i, visited);
}
return;
}
return 0;
}