Solved

In the Pseudocode for the Dfs Function for Partitioning the Vertices

Question 50

Multiple Choice

In the pseudocode for the dfs function for partitioning the vertices in a graph into disjointed components, what is the missing pseudocode statement? dfs(graph, v, s) :
Mark v as visited
S.add(v)
For each vertex, w, adjacent to v:
If w is unvisited:
<missing pseudocode>


A) s.add(w)
B) dfs(graph, v, s)
C) s.add(v)
D) dfs(graph, w, s)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents