how to find children of all the nodes in order n time.
Count children of all the nodes
all the child nodes not the immediate ones
u can do it using dfs.
all u ahve to compute is this->
child[parent]= summation of 1+child[neigbhour]
refer this article-> link
could you please send me he algorithm