PREREQUISITE : DFS , Similar to Articulation Bridge So Basic idea of Articulation Bridge will help . Explanation Link : https://cp-algorithms.com/graph/cutpoints.html