Solved

number of leaves in a binary tree

Posted on 2012-03-24
3
275 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 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