Function to perform the DFSUtil ( ) for all the unvisited vertices
static void DFS ( int V , bool [ ] initial , bool [ ] finall ) { ans = 0 ; visited = new List < bool > ( ) ; for ( int i = 0 ; i < V ; i ++ ) { visited . Add ( false ) ; }