daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Apr 27th, 2012 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void DFS_visit(int u){
  2.    visited[u] = true; //marks node u as visited
  3.    for(int v = 1; v <= n; v = v+1){ //checks all nodes
  4.        if(visited[v] == false && Adj[u][v] == true) //checks if node v is connected to u and hasn’t been visited yet
  5.            DFS_visit(v); //if yes, calls DFS_visit() for node v
  6.    }
  7. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand