[BEST VIDEO EXPLANATION FOUND SO FAR] + CODE [C++]
The best explanation to find out the logic link: https://www.youtube.com/watch?v=RYaakWv5m6o\n\n\nclass Solution {\npublic:\n \n    vector<vector<int>> critical
The best explanation to find out the logic link: https://www.youtube.com/watch?v=RYaakWv5m6o\n\n```\nclass Solution {\npublic:\n \n    vector<vector<int>> criticalConnections(int n, vector<vector<int>>& connections) {\n        vector<vector<int>> adj(n,vector<int> ());\n          vector<vector<int>> res;\n        for(auto c:connections){\n            adj[c[0]].push_back(c[1]);\n            adj[c[1]].push_back(c[0]);\n        }\n        vector<int> ranks(n,NO_RANK);\n        dfs(adj,n,0,0,ranks,res);\n        return res;\n    }\n    \nprivate:\n    static const int NO_RANK;\n    int dfs(vector<vector<int>>& adj,int n, int at, int at_Rank, vector<int>& ranks,vector<vector<int>>& res){\n        if(ranks[at]!=NO_RANK){\n            return ranks[at];\n        }\n        \n        int lowestRank = at_Rank;\n        ranks[at]=at_Rank;\n        \n        for(auto to : adj[at]){\n            if(ranks[to] == at_Rank-1 || ranks[to] == n){\n                continue;\n            }\n            int to_Rank = dfs(adj,n,to,at_Rank+1,ranks,res);\n            lowestRank = min(lowestRank,to_Rank);\n            if(to_Rank > at_Rank){\n                res.push_back({min(to,at),max(to,at)});\n            }\n        }\n        ranks[at] = n;\n        return lowestRank;\n    }\n};\nconst int Solution::NO_RANK = -2;\n```
[]