MathJax


Wednesday, August 21, 2024

2024-231

How does a Depth-First Search (DFS) provide a topological sort ?


A) Sorting nodes by finishing time, in ascending order

B) Selecting nodes in a random order

C) Visiting nodes in alphabetical order

D) Sorting nodes by finishing time, in descending order

E) None of the above


Original idea by: Cinthia Kleiner

No comments:

Post a Comment

2025-255

A   BFS  was performed on an unknown graph, producing the following visitation order: a-c-d-b-f-g-e-h There are four candidate graphs: I) II...