Java solution - using Tarjan algorithm
\n// Tarjan algorithm: https://www.youtube.com/watch?v=RYaakWv5m6o\n\nclass Solution {\n    \n    List<List<Integer>> result = new ArrayList<>();\n    \n    pub
```\n// Tarjan algorithm: https://www.youtube.com/watch?v=RYaakWv5m6o\n\nclass Solution {\n    \n    List<List<Integer>> result = new ArrayList<>();\n    \n    public List<List<Integer>> criticalConnections(int n, List<List<Integer>> connections) {\n        // construct a graph based on the nodes in the edges (connections)\n        Map<Integer, List<Integer>> g = new HashMap<>();\n        for (List<Integer> edge: connections) {\n            int node1 = edge.get(0);\n            int node2 = edge.get(1);\n            \n            g.putIfAbsent(node1, new ArrayList<>());\n            g.get(node1).add(node2);\n            \n            g.putIfAbsent(node2, new ArrayList<>());\n            g.get(node2).add(node1);\n        }\n        \n        // populate timestamps array using tarjan\'s algorithm\n        int[] timestamps = new int[n];\n        helper(g, 0, 0, 1, timestamps);\n        \n        return result;\n    }\n    \n    private int helper(Map<Integer, List<Integer>> g, int curr, int parent, int ts, int[] timestamps) {\n        timestamps[curr] = ts;\n        for (int nextNode: g.get(curr)) {\n            // The next node ignores parent node\n            if (nextNode == parent) continue;\n            \n            // If next nodes have already been traversed, set the timestamp of\n            // current node to minimum of all next nodes\n            if (timestamps[nextNode] > 0)\n                timestamps[curr] = Math.min(timestamps[curr], timestamps[nextNode]);\n            else\n                // else, set the timestamp of current node to minimium of all it\'s children.\n                timestamps[curr] = Math.min(timestamps[curr], helper(g, nextNode, curr, ts + 1, timestamps));\n            \n            // As defined by Tarjan\'s algorithm, if the timestamp of the current node is already\n            // smaller than that of it\'s next node (child), then the edge connecting the\n            // current and next nodes make up a critical connection.\n            if (ts < timestamps[nextNode])\n                result.add(Arrays.asList(curr, nextNode));\n        }\n        \n        return timestamps[curr];\n    }\n}\n```
[]