Python, DFS
Inspired by tarjan, but simplified to just do what is requested in a problem, i.e. find the critical paths (and not strongly connected components):\n\ndef criti
Inspired by tarjan, but simplified to just do what is requested in a problem, i.e. find the critical paths (and not strongly connected components):\n```\ndef criticalConnections(self, n: int, connections: List[List[int]]) -> List[List[int]]:\n\n\tcons = defaultdict(set)\n\tfor a, b in connections:\n\t\tcons[a].add(b)\n\t\tcons[b].add(a)\n\n\tlow = {}\n\tresults = []\n\tdef visit(node, from_node=None):\n\t\tif node in low: return low[node]\n\t\tcur_id = low[node] = len(low)\n\t\t\n\t\tfor neigh in cons[node]:\n\t\t\tif neigh == from_node: continue\n\t\t\tlow[node] = min(low[node], visit(neigh, node))\n\t\t\n\t\tif cur_id == low[node] and from_node is not None:\n\t\t\tresults.append([from_node, node])\n\t\treturn low[node]\n\n\tvisit(0)\n\treturn results\n```
['Python', 'Python3']