文件名称:算法—判断一个图是否是连接的;是否是树;是否有环,有环的话打印出来
文件大小:37KB
文件格式:DOC
更新时间:2012-01-17 16:34:01
图——判断是否连接,是否为树,是否有环
Design a linear time algorithm for each of the following problem: (1) given a graph G, test if G is connected. (2) given a graph G, test if G is a tree. (3) given a graph G, test if G has a cycle,if so,print a cycle