I want to ask is subtree concept applicable in graphs, like in this problem I first found out all the bridges in graph and considered 1 as the root of the graph, then say u - v is a edge , so if u is parent then size of v is subtree size of v and size of u is size of 1 - size of v in this way i am checking the size of each of the components, why my concept is wrong and how to solve this problem.