Find bridges in a graph
https://www.geeksforgeeks.org/bridge-in-a-graph/\n\n\nclass Solution:\n    def criticalConnections(self, n: int, connections: List[List[int]]) -> List[List[int]
https://www.geeksforgeeks.org/bridge-in-a-graph/\n\n```\nclass Solution:\n    def criticalConnections(self, n: int, connections: List[List[int]]) -> List[List[int]]:\n        graph=collections.defaultdict(set)\n        for x,y in connections:\n            graph[x].add(y)\n            graph[y].add(x)\n        \n        def bridgeUtil(u, visited, parent, low, disc, time): \n\n            # Mark the current node as visited and print it \n            visited[u]= True\n\n            # Initialize discovery time and low value \n            disc[u] = time[0]\n            low[u] = time[0]\n            time[0]+=1\n\n            #Recur for all the vertices adjacent to this vertex \n            ans=[]\n            for v in graph[u]: \n                # If v is not visited yet, then make it a child of u \n                # in DFS tree and recur for it \n                if visited[v] == False : \n                    parent[v] = u \n                    find = bridgeUtil(v, visited, parent, low, disc,time) \n                    ans.extend(find)\n\n                    # Check if the subtree rooted with v has a connection to \n                    # one of the ancestors of u \n                    low[u] = min(low[u], low[v]) \n\n\n                    \'\'\' If the lowest vertex reachable from subtree \n                    under v is below u in DFS tree, then u-v is \n                    a bridge\'\'\'\n                    if low[v] > disc[u]: \n                        ans.append([u,v])\n\n\n                elif v != parent[u]: # Update low value of u for parent function calls. \n                    low[u] = min(low[u], disc[v]) \n            return ans\n\n\n\n        visited = [False] * (n) \n        disc = [float("Inf")] * (n) \n        low = [float("Inf")] * (n) \n        parent = [-1] * (n) \n\n        # Call the recursive helper function to find bridges \n        # in DFS tree rooted with vertex \'i\' \n        ans=[]\n        time=[0]\n        for i in range(n): \n            if visited[i] == False: \n                ans.extend(bridgeUtil(i, visited, parent, low, disc,time))\n        return ans\n```
[]