hi,everyone
i want to count the leaf node,and i know the code with recursive method, and i want to know the non recursive method.
Printable View
hi,everyone
i want to count the leaf node,and i know the code with recursive method, and i want to know the non recursive method.
What have you tried? You will need some type of loop to iterate through the tree (I'm assuming this is what you are asking - but the vagueness of your post leaves many of us guessing - recommended reading: How To Ask Questions The Smart Way )