C++ || using Tarjan's algorithm|| Intuition of Tarjan's algo (video link)
Really good video for intuition of tarjan\'s algorithm\nhttps://www.youtube.com/watch?v=RYaakWv5m6o&ab_channel=TechRevisions\n```\nclass Solution {\nprivate:\n 
Really good video for intuition of tarjan\'s algorithm\n[https://www.youtube.com/watch?v=RYaakWv5m6o&ab_channel=TechRevisions](http://)\n```\nclass Solution {\nprivate:\n    void tarjan(int curr, int parent, int time, vector<vector<int>>& AdjLis, vector<int>& low, vector<vector<int>> &ans){\n        low[curr] = time++;\n        for (auto x: AdjLis[curr]){\n            if (x==parent)\n                continue;\n            if (low[x]==0) tarjan(x, curr, time, AdjLis, low, ans);\n            low[curr] = min(low[curr], low[x]);\n            if (low[x]==time)\n                ans.push_back({curr,x});\n        }\n    }\npublic:\n    vector<vector<int>> criticalConnections(int n, vector<vector<int>>& connections) {\n        // 1. Constructing graph using Adjacency list\n        vector<vector<int>> AdjLis(n);\n        for (auto x: connections){\n            AdjLis[x[0]].push_back(x[1]);\n            AdjLis[x[1]].push_back(x[0]);\n        }\n        // 2. finding critical connections\n        vector<vector<int>> ans;\n        vector<int> low(n);\n        tarjan(0, -1, 1, AdjLis, low, ans);\n        return ans;\n    }\n};
['Depth-First Search', 'C', 'C++']