You could keep track right from the beginning, and increment a leaf count each time you add on a new node to the binary tree. Or you can recursively transverse each node incrementing a count value to obtain the # of nodes. Mike L.G.
mlg400@linuxmail.org
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.