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