i am looking for a fast Algorithm just to determine if a given directed graph contains a bridge or not …
not concerned about the location of this bridge .. only whether the graph contains it or not.
i am looking for a fast Algorithm just to determine if a given directed
Share
i’ve just found a better or simpler solution for that ..
choose any node run a simple dfs and check if every node is visited then reverse all the edges and starting from the same node check if you can visit all the nodes again if not then it surely contains a Bridge.