Count children of all the nodes

how to find children of all the nodes in order n time.

hello @komal_78
u want to compute immediate children or all child node of a given node?

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

here it is=>link