Strongly Connected

Hey am stuck with this question .Please help me out :slight_smile:


Thnks in advance
  1. find the strongly connected components .
  2. 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