Strongly Connected Component Kosaraju, is a Graphs related problem and in this post we will see how we can solve this challenge in C++

Detect whether a Graph is Eulerian or not Eulerian graph is one with a Eulerian Path. Euler path is that path which covers all the vertices exactly once This code uses Kosaraju's algo:

  1. do dfs from any vertex: if all vertices visited do step 2 else return false;

  2. Make all vertices unvisited Transpose the graph(reverse the edges) Do DFS again from the same vertex and check if it still makes all vertices visited if yes then return true else return false

    If the graph is strongly connected then each vertex can be reached ,so if we reverse the edges even then if there is an path between then it will still be able to make you reach vertices

Please check the main.cpp snippet for the solution.

This solution originally posted at: Github by @susantabiswas