2018年6月9日 星期六

[Algorithm][Graph] Topological sort

Topological-Sort(G)
  1. call DFS(G) to compute finishing times v.f for each vertex v
  2. as each vertex is finished, insert in onto the front of a linked list
  3. return the linked list of vertices

Problem:

沒有留言:

張貼留言