Solved

number of leaves in a binary tree

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
No row return after calling the fillschema method 4 40
Events in static methods 3 50
VB.NET return row from SQL to DataSet and get column values ? 3 31
Variable Event ? 3 23
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

22 Experts available now in Live!

Get 1:1 Help Now