Q8
NATMarks unknownLet be a Depth First Tree of a undirected graph . An array indexed by the vertices of is given. is the parent of vertex , in . Parent of the root is the root itself. Give a method for finding and printing the cycle formed if the edge of not in (i.e., ) is now added to . Time taken by your method must be proportional to the length of the cycle. Describe the algorithm in a PASCAL – like language. Assume that the variables have been suitably declared.
Sign in to save attempts.
Loading…