C++ tarjon, clear solution
\nclass Solution {\n    vector<vector<int>> g, ret;\n    vector<int> dfn, low;\n    int timestamp = 0;\npublic:\n    vector<vector<int>> criticalConnections(int
```\nclass Solution {\n    vector<vector<int>> g, ret;\n    vector<int> dfn, low;\n    int timestamp = 0;\npublic:\n    vector<vector<int>> criticalConnections(int n, vector<vector<int>>& connections) {\n        dfn = vector<int>(n);\n        low = vector<int>(n);\n        g.resize(n);\n        for(auto& c: connections) {\n            int u = c[0], v = c[1];\n            g[u].push_back(v);\n            g[v].push_back(u);\n        }\n        dfs(0, -1);\n        return ret;\n    }\n    \n    void dfs(int cur, int pre) {\n        if(dfn[cur] > 0) \n            return;\n        dfn[cur] = low[cur] = ++timestamp;\n        for(int next: g[cur]) {\n            if(next == pre) {\n                continue;\n            }\n            dfs(next, cur);\n            low[cur] = min(low[cur], low[next]);\n            if(low[next] > dfn[cur]) {\n                ret.push_back({cur, next});\n            }\n        }\n    }\n};\n```
[]