I have a hw problem that asks for an algorithm that detects if there is any cycle in any undirected graph that contains any given edge 'E'. The algorithm should run in O(N) linear time.
The problem I have is that I don't know where to start. I have some simple sample graphs but I dont know where to go from there.
Any hints?