Hey am stuck with this question .Please help me out

Thnks in advance

Hey am stuck with this question .Please help me out

Thnks in advance

- find the strongly connected components .
- find the simple connected component .if any of the nodeâ€™s connected component number is equal to the size of the total number of nodes the print the strongly connected component corresponding to that node

else print -1;

here is my soln . i used kosaraju-sharir algorithm to calculate strongly connected component

feel free to ask if any doubt

1 Like