2-edge connected graph means the graph is always connected if we remove any edge of that graph.
For checking a graph is a two-edge connected graph , we just need to check whether for every sub-tree
of the graph there should be an edge going from that sub-tree to outside vertex and that vertex is
already visited.This can be solved by using DFS and in linear time.
PSUEDOCODE :
The below code returns the minimum value of the arrival time of the back-edge that the sub-tree is connected with.
time=0; 2edgeconnected(v) { visited[v]=1; arr[v]=time++; int xyz=arr[v]; for all w adjecent to v do { if(!visited[w]) xyz=min(xyz,2edgeconnected(w)); else xyz=min(xyz,arr[w]); } if(xyz==arr[v]) abort //graph is not two-edge connected. return xyz; }