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:
A. s.add(w)
B. dfs(graph, v, s)
C. s.add(v)
D. dfs(graph, w, s)
Answer: D
Computer Science & Information Technology
You might also like to view...
In File Explorer, the Ribbon allows users to interact with the operating system through the use of tabs located at the top of the screen
Indicate whether the statement is true or false
Computer Science & Information Technology
If a node has recently sent a frame to another node, where is the mapping of IPv4 address to MAC address stored?
a. MAC table b. ARP cache c. Routing table d. NVRAM
Computer Science & Information Technology