Pergunta de entrevista da empresa Volt Information Sciences

in a tree data structure, write code that returns number of child nodes in each nodes