snippets/graph/Connectivity/isStronglyConnected.cpp
void Graph::DFSUtil(int v, bool visited[])
{
    // Mark the current node as visited and print it
    visited[v] = true;

    // Recur for all the vertices adjacent to this vertex
    list<int>::iterator i;
    for (i = adj[v].begin(); i != adj[v].end(); ++i)
        if (!visited[*i])
            DFSUtil(*i, visited);
}
// A recursive function to print DFS starting from v
A recursive function to print DFS starting from v
A recursive function to print DFS starting from v
void Graph::DFSUtil(int v, bool visited[])
{
    visited[v] = true;
    list<int>::iterator i;
    for (i = adj[v].begin(); i != adj[v].end(); ++i)
        if (!visited[*i])
            DFSUtil(*i, visited);
}
void Graph :: DFSUtil ( int v , bool visited [ ] ) { visited [ v ] = true ; list < int > :: iterator i ; for ( i = adj [ v ] . begin ( ) ; i != adj [ v ] . end ( ) ; ++ i ) if ( ! visited [ * i ] ) DFSUtil ( * i , visited ) ; }
A recursive function to print DFS starting from v
A recursive function to print DFS starting from v
// Mark the current node as visited and print it // Recur for all the vertices adjacent to this vertex