By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,423 Members | 1,294 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,423 IT Pros & Developers. It's quick & easy.

how to traverse a tree

P: 14
I need to traverse a binary search tree and be able to give an output of how many leaf nodes there are, and how many leafs have one child and how many leafs have two children. Im not asking for a code just the general idea of how to process the information. Thank you
Aug 29 '07 #1
Share this Question
Share on Google+
1 Reply


Ganon11
Expert 2.5K+
P: 3,652
Well, how could you possibly do this?

One thing I remember about working with trees is that most of this type of work was done with recursion. Have you worked with recursive functions before? If so, this should be easy!
Aug 29 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.