It's a simple modification of Articulation Points finding algorithm . Here in place of Inserting a node into the set we will increase the map value of that vertex . Initially we will map the value of all vertex by 1 . Because initially all vertices are part of one connected componenet .that means if we delete any vertex there will be atleast one connected component .