[理工] 演算法 DFS

看板Grad-ProbAsk作者 (Paradise Lost)時間13年前 (2012/06/16 23:15), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Given as input a connected undirected graph G, a spanning tree T of G, and a vertex v, design an algorithm to determine whether T is a valid DFS tree of G rooted at v. In other words, determine whether T can be the ouput of DFS under some order of the edges starting with v. The runnung time of the algorithm should be O(|V|+|E|) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.45.27.36
文章代碼(AID): #1FtAC89S (Grad-ProbAsk)
文章代碼(AID): #1FtAC89S (Grad-ProbAsk)