Feb. 21, 2014, 4:24 p.m. by Rosalind Team
Topics: Graphs
Given: A positive integer
Return: For each graph, output "1" if the graph is acyclic and "-1" otherwise.
See Figure 1 for visual example from the sample dataset.
3 2 1 1 2 4 4 4 1 1 2 2 3 3 1 4 3 4 3 3 2 2 1
1 -1 1