Share
Design an algorithm which, given a directed graph G = (V, E) and a particular edge e ∈ E, going from node u to node v determines whether G has a cycle containing e. The running time should be bounded by O(|V | + |E|). Explain why your algorithm runs in O(|V | + |E|) time.
ReportQuestion
Please briefly explain why you feel this question should be reported.
Design an algorithm which, given a directed graph G = (V, E) and a particular edge e ∈ E,
going from node u to node v determines whether G has a cycle containing e. The running time
should be bounded by O(|V | + |E|). Explain why your algorithm runs in O(|V | + |E|) time.
Answer ( 1 )
Please briefly explain why you feel this answer should be reported.