You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DFS(G)
for each vertex u ∈ G.v
u.color = WHITE
u.pi = NIL
time =0
size_list = []
for each vertex u ∈ G.V
c = 1
if u.color = WHITE
DFS-VISIT(G,u,c)
record c in size_list
DFS-VISIT(G,u, c)
time=time+1
u.d=time
u.color=GRAY
u.d = time
u.color = GRAY
for each v ∈ G.Adj[u]
if v.color = WHITE
v.pi=u
c+=1
DFS-VISIT(G,v)
u.color = BLACK
time=time+1
u.f = time
The text was updated successfully, but these errors were encountered:
DFS(G) for each vertex u ∈ G.v u.color = WHITE u.pi = NIL time =0 size_list = [] for each vertex u ∈ G.V c = 1 if u.color = WHITE DFS-VISIT(G,u,c) record c in size_list DFS-VISIT(G,u, c) time=time+1 u.d=time u.color=GRAY u.d = time u.color = GRAY for each v ∈ G.Adj[u] if v.color = WHITE v.pi=u c+=1 DFS-VISIT(G,v) u.color = BLACK time=time+1 u.f = time
The text was updated successfully, but these errors were encountered: