Check if a graph has exactly one cycle.

227 Views Asked by At

Design an efficient algorithm which given a directed graph G in the adjacency-list representation, checks whether or not it is a single-cycle graph. What is the fastest algorithm to do such a question?