Solved

number of leaves in a binary tree

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now