A man wants to go different places in the world. He has listed them down all. But there are some places where he wants to visit before

Trường Phan

New member
A man wants to go different places in the world. He has listed them down all. But there are some places where he wants to visit before some other places. What application of graph can he use to determine that?
A. Depth First Search
B. Breadth First Search
C. Topological Sorting
D. Dijkstra’s Shortest path algorithm
 
Answer: C
Explanation: As the definition of topological sorting suggests, it is the way to do tasks in prescribed order. So, if he does topological sorting, it will be easy for him to recognize what should be the order to visit different places.
 

Tìm kiếm

Back
Top