edited by
553 views

1 Answer

1 votes
1 votes

Starting from A : neighbors = B,D

Visit B: neighbors E

Visit E : neighbors C,G

Visit C : neighbors A,G

Visit G : neighbors null

backtrack till A

Visit D : neighbors F

Visit F.

now edges {FC, CA} forms loop hence back edges

edges {EG, FG } are cross edges.

Initially I've taken FC also as a cross edge but it helps to form a cycle hence it is not considered as a cross edge.

Related questions

0 votes
0 votes
0 answers
2
3 votes
3 votes
2 answers
3