Impetus Technologies Interview Question

given tree count nodes of the tree.