Solved

number of leaves in a binary tree

Posted on 2012-03-24
3
274 Views
Last Modified: 2012-03-25
Could anyone give me a piece of VB.NET code that, recursively, computes the number of leaves in a binary tree.

Thanks.
0
Comment
Question by:HLRosenberger
3 Comments
 
LVL 4

Accepted Solution

by:
Nguyen Doan Tien earned 500 total points
ID: 37762826
Dear HLRosenberger,

I've ever seen your problem. In fact, There are three ways to traverse the tree:
1) Post order traversal
2) Pre order traversal
3) In order traversal
Here is an example from code project:
http://www.codeproject.com/Articles/4647/A-simple-binary-tree-implementation-with-VB-NET
I think it will helpful for you.

BR,
---------
Tien Nguyen
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 37763904
thanks
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question