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)
kruskal
DFS
I"d like to ask if there is any other better algorithm.