Advertisement
Davencode

Davedere

Jan 14th, 2022
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. ALGO(G,X,u,v)
  2. INIT(G)
  3. dfs_visit(GT,v,c1)
  4. dfs_visit(G,u,c2)
  5. for each x in X do
  6. if(c1[x]=n && c2[x]=n)then
  7. if(c1[u]=b || c2[u]=b)then
  8. if(c1[v]=b || c2[v]=b)then
  9. return false
  10. return true
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement