Write a program to decide if a graph has a Cycle or not. The given graph can be a directed or undirected graph, which is indicated at the time of reading the input (0 for directed graph and 1 for undirected graphs). The input is given as an adjacency list.
標簽:
graph
directed
program
decide
上傳時間:
2013-12-23
上傳用戶:cursor