An algorithm for finding the edges of all rings in a marked graph

topic description

it is known that there is a graph consisting of several connected components, and now it is required to mark the edges of all rings in the graph. The example diagram is as follows: (that is, marked with red edges)

clipboard.png

kruskal
DFS

clipboard.png

I"d like to ask if there is any other better algorithm.

Mar.23,2022

thought for a moment that breadth first might be more appropriate

clipboard.png


Baidu [connected component algorithm of undirected graph] is an important part of graph theory algorithm.


the directed graph is directly topologically sorted and then the undeleted edge markers are found.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bc6ee4-30825.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bc6ee4-30825.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?