Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

number of leaves in a binary tree

Posted on 2012-03-24
3
Medium Priority
?
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
Nguyen Doan Tien earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

636 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